Hi,
yep sorry, the syntax was messy, but fortunately only in my example, not in my sourcefile ;-).
I did some more testing and it appeared it was indeed impossible to include files from another context (apparently in accordance with the servlet/jsp specification), so I think I have to solve it by putting a and b in the same context.


Groetjes
Hans

At 12:19 03/04/2003 -0600, Turoff, Steve wrote:
First, note that your syntax was incorrect - you put the @ in front of the %.

Second, try this:

<%@ include file="/a/myinclude.jsp" %>

Note that this is a static include, ie, if you change /a/myinclude.jsp the change will not show up in the file including it, unless that file is recompiled. Dynamic includes would use the following syntax:

<jsp:include page="/a/myinclude.jsp" flush="true" />

More info available at: http://www.jspinsider.com/reference/jsp/jspincludes.html

Steve

-----Original Message-----
From: Hans Wichman [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 6:02 AM
To: [EMAIL PROTECTED]
Subject: includes


Hi,


in my webapps directory I have two distinct subtrees, say a/ and b/ of
which a/ is protected through tomcat's authorisation mechanism. Only now I
can't seem to include any files from subtree a in b, so for example in

b/test.jsp I have a line stating : <@% include
file="/usr/local/jakarta-tomcat-4.1.18/webapps/a/myinclude.jsp" %>
and jasper comes back with a statement: cannot find include etcetc.

Does anybody know what I am doing wrong ? Should I include the full path,
or is it because of the authorisation mechanism ?

regards,
Hans


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to