掲示板

context path not obtained when instanceable set to false

12年前 に sand s によって更新されました。

context path not obtained when instanceable set to false

New Member 投稿: 2 参加年月日: 11/12/01 最新の投稿
Hello,

I'm having a problem obtaining the context path of my portlet when the portlet is set to instanceable false.

When true, the context path is retrieved properly, which is /name-of-my-portlet. I use this context path only for the purpose of displaying images on my portlet with <img src="<%=request.getContextPath()%>/images/image1.png"/>

But when set to false, the context path becomes " / " and my images are no longer displayed. I have tried overriding the default context path in portal-ext.properties by setting it explicitly to /name-of-my-portlet, but nothing will work when instanceable is false.

I need to set instanceable to false in order for my url mapping property to work, so setting it to true won't work for me.

Does someone have a solution to this problem of getting the correct context path? Or another way which I could display images without using the context path?

Thanks!
thumbnail
11年前 に Amigoo Earth によって更新されました。

RE: context path not obtained when instanceable set to false

New Member 投稿: 8 参加年月日: 12/10/15 最新の投稿
Maybe there are some relationship between context path issue and the freemarker parse problem.
https://www.liferay.com/forums/-/message_boards/message/18013355