<jsp:include> is limited to "...the inclusion of static and dynamic resources in
the same context as the current page." But, since it looks like you're using TC
4.x, you can take advantage of JSTL to include content from a different context
within the same container or even from an absolute URL. For example (different
context, same container):

<c:import url="/topfile.htm" context="/includes"/>

See:
http://java.sun.com/products/jsp/jstl/index.html
http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

Quoting Eman Fattouh <[EMAIL PROTECTED]>:

> i'm appreciating your response, but are u sure that there is no another
> solution? i can't use links as these files are the banner and footer of the
> site, so i have to use jsp:include tag..
> all that i want to make sure..is it really not permitted to refer to any
> static resources outside my webapplication?
> if it is possible.. how to?
> 
> ----- Original Message -----
> From: "Aleksandr Shneyderman" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, December 12, 2002 3:53 PM
> Subject: RE: need help urgently
> 
> 
> >
> > the workaround that would be to put a link (include) in test1 and test2
> > that links to the ../include
> >
> > Alex.
> >
> > > -----Original Message-----
> > > From: Eman Fattouh [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, December 12, 2002 8:48 AM
> > > To: Tomcat Users List
> > > Subject: need help urgently
> > >
> > >
> > > dear all;
> > >      i have some applications under webapps folder. all of them
> > > must include some static html files. the problem is if i jave the
> > > following file system:
> > >  /var/tomcat4/webapps/test1 ------> application 1 containing
> > > test1.jsp file and others
> > >  /var/tomcat4/webapps/test2 -------> application 2
> > >  /var/tomcat4/webapps/includes ----> folder containing only html
> > > static files, not an application , for example: topfile.htm
> > >
> > > how to refer to these static files (inside includes) from my jsp?
> > > for example, when i refer to topfile.htm from test1.jsp as follows:
> > > <jsp:include page="../includes/topfile.htm" flush="true"/>
> > > the page is loaded balnk. why?
> > >
> > > is it not allowed to refer to any folder outside my application?
> > > if so, how to work around that?
> > > Regards
> > > Iman
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

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

Reply via email to