JSP @include directive
I must be doing something wrong, Resources doesn't work for me. Perhaps someone can point out the problem. I need to include a file from outside of my webapp's directory tree using directive: <%@ include file="inc/foo.inc" %> For that purpose I defined Resources element like this: In theory I should see Tomcat opening "$CATALINA_HOME"/webapps/inc/foo.inc, but it goes for "$CATALINA_HOME"/webapps/myapp/inc/foo.inc. What am I doing wrong? Alex Alexander Leyke wrote: Hi, I need to use include directive in JSP that points to file physically located outside directory tree for Web application context. I tested two forms of include directive: <%@include file="/../inc/name.inc" %> and <%@include file="/symlink/name.inc" %>. As far as I can tell from Tomcat 4.1.18 sources the former is forbidden, i.e., cannot specify path that goes beyond application context. The latter is OK, as long as org.apache.naming.resources.FileDirContext.setAllowLinking() has been called with true argument. You have to use a Resources element for that to be called. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP @include directive
Alexander Leyke wrote: Hi, I need to use include directive in JSP that points to file physically located outside directory tree for Web application context. I tested two forms of include directive: <%@include file="/../inc/name.inc" %> and <%@include file="/symlink/name.inc" %>. As far as I can tell from Tomcat 4.1.18 sources the former is forbidden, i.e., cannot specify path that goes beyond application context. The latter is OK, as long as org.apache.naming.resources.FileDirContext.setAllowLinking() has been called with true argument. You have to use a Resources element for that to be called. Remy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP @include directive
Hi, I need to use include directive in JSP that points to file physically located outside directory tree for Web application context. I tested two forms of include directive: <%@include file="/../inc/name.inc" %> and <%@include file="/symlink/name.inc" %>. As far as I can tell from Tomcat 4.1.18 sources the former is forbidden, i.e., cannot specify path that goes beyond application context. The latter is OK, as long as org.apache.naming.resources.FileDirContext.setAllowLinking() has been called with true argument. Symlinks are disallowed by default and I don't see any place in the code where setAllowLinking method gets called. Sounds like a problem to me. Please tell me if above behavior is erroneous, and how can I cope with this situation. Thank you, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]