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]

Reply via email to