Re: JSP -- include-file directive question..
- From: Manish Pandit <pandit.manish@xxxxxxxxx>
- Date: Thu, 28 Jun 2007 19:42:35 -0000
On Jun 28, 8:13 am, maya <maya778...@xxxxxxxxx> wrote:
in a directive like this..
<%@ include file="inc_nav.jsp"%>
can included file be anything other than a JSP? since in project I'm
working on the included files contain only static content I made them
html's so I don't have to precompile the site every time I make a change
to them.. but I get cannnot-include error (before, they were JSP's; only
get error now that converted them to .html's..)
thank you..
You should be able to use this directive for html content too. Can you
paste the exception message on tomcat console?
Also, you might want to try <jsp:include page="your_page_here"/> tag
as an alternative. This handles both static and dynamic content. The
include directive copy-pastes the included file into the main jsp, and
then compiles the combined file into a servlet. On the other hand,
include action will run the included page every time and then merge
its output with the overall output. You should be fine using the
directive if the files are static/not changing. The only problem I can
see (with directive) is the size of the resultant file. It it is huge,
the compilation might fail (>64k).
-cheers,
Manish
.
- References:
- JSP -- include-file directive question..
- From: maya
- JSP -- include-file directive question..
- Prev by Date: Re: Ordering information from a file
- Next by Date: Re: JSP -- include-file directive question.. it gets weirder...
- Previous by thread: JSP -- include-file directive question..
- Next by thread: Re: JSP -- include-file directive question.. it gets weirder...
- Index(es):