Foros de discusión

context path not obtained when instanceable set to false

sand s, modificado hace 12 años.

context path not obtained when instanceable set to false

New Member Mensajes: 2 Fecha de incorporación: 1/12/11 Mensajes recientes
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
Amigoo Earth, modificado hace 11 años.

RE: context path not obtained when instanceable set to false

New Member Mensajes: 8 Fecha de incorporación: 15/10/12 Mensajes recientes
Maybe there are some relationship between context path issue and the freemarker parse problem.
https://www.liferay.com/forums/-/message_boards/message/18013355