Foren

<%@ include file in a portlet code

thumbnail
Jari Fredriksson, geändert vor 13 Jahren.

<%@ include file in a portlet code

Junior Member Beiträge: 27 Beitrittsdatum: 14.09.10 Neueste Beiträge
Stock jsp contains stuff like

<%@ include file="/html/portlet/init.jsp" %>

and that works, the init.jsp in in the root. Buf how about including my own stuff?

This does not work..
<%@ include file="/myportlet/init.jsp" %>

My portlet is deployed as a separate war, and it's stuff is not accessible noither in the root, nor after the portlet name ???

Something obvious escapes my poor mind here, please advice.

I'm running Liferay 6.0.5 on the JBoss bundle.
thumbnail
Jari Fredriksson, geändert vor 13 Jahren.

RE: <%@ include file in a portlet code

Junior Member Beiträge: 27 Beitrittsdatum: 14.09.10 Neueste Beiträge
Actually...

I can include my own init with

<%@ include file="init.jsp" %>

But I can't in my portlet

<%@ include file="/html/portlet/init.jsp" %>

Dunno if that is necessary, but I guess it might be...
thumbnail
jelmer kuperus, geändert vor 13 Jahren.

RE: <%@ include file in a portlet code

Liferay Legend Beiträge: 1191 Beitrittsdatum: 10.03.10 Neueste Beiträge
you cannot include files from another context

/html/portlet/init.jsp resides in the ROOT context your jsp most likely does not

see JSP.1.2.1 Relative URL Specifications in the jsp spec
thumbnail
Jari Fredriksson, geändert vor 13 Jahren.

RE: <%@ include file in a portlet code

Junior Member Beiträge: 27 Beitrittsdatum: 14.09.10 Neueste Beiträge
Yeah ok, my mistake.