Keep in mind when including there are two ways (maybe more) to do it.

If you use the extension .jsp on a file you include in another jsp, then
that jsp page is being compiled as a separate .class file. Thus, you in
effect do a servlet chain from your jsp page, to that jsp page, and back. If
you give it an extension like .inc, you in effect inline include it right
into the processing of your jsp page. The result is a larger single .class
file, but you get better performance. These days I am willing to sacrafice
size for speed.


>-----Original Message-----
>From: A mailing list about Java Server Pages specification and reference
>[mailto:[EMAIL PROTECTED]]On Behalf Of Matt Krevs
>Sent: Wednesday, April 12, 2000 12:40 AM
>To: [EMAIL PROTECTED]
>Subject: Including files from other directories
>
>
>Does anyone know how to include a file that is not in the same directory or
>in a subdirectory of the 'includer' file?
>
>eg
>
>I have the following directories/files
>
>main.jsp
>include/afile.jsp
>include1/anotherFile.jsp
>
>I have included 'include/afile.jsp' within main.jsp. This works fine.
>
>I want to include anotherFile.jsp in afile.jsp
>
>Among other attempts I tried the following from within afile.jsp
>
><jsp:include name="../include1/anotherFile.jsp" flush="true"/>
>
>but have had no luck. I get the following error
>
>"Resource /include/../include1/anotherFile.jsp not found"
>
>I cant seem to get the JSP engine to look for a file that is not
>in the same
>directory or a subdirectory of the 'includer' file.
>
>Any tips would be great. Thanks.
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to