aspose file tools*
The moose likes Servlets and the fly likes Error: Invalid jsp:include Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error: Invalid jsp:include Tag " Watch "Error: Invalid jsp:include Tag " New topic
Author

Error: Invalid jsp:include Tag

Raj_kurup
Greenhorn

Joined: May 12, 2001
Posts: 4
I included the following line of code into my JSP file
<jsp:include page="HealthPolicies.jsp" />
and I am getting Invalid jsp:include Tag error.
The HealthPolicies.jsp executes fine when I invoke it independently.
Internal Servlet Error:
org.apache.jasper.compiler.CompileException: C:\Tomcat\webapps\MyJSP\Project\PresentCompanyHealthCareInfo.jsp(5,0) Invalid jsp:include tag
at org.apache.jasper.compiler.IncludeGenerator.(IncludeGenerator.java:95)
at org.apache.jasper.compiler.JspParseEventListener.handleInclude(JspParseEventListener.java:877)
at org.apache.jasper.compiler.DelegatingListener.handleInclude(DelegatingListener.java:185)
at org.apache.jasper.compiler.Parser$Include.accept(Parser.java:299).........
Note: Running on Tomcat 3.2 on win98 OS.
Please help me.
Raj.

Phil Hanna
Ranch Hand

Joined: Apr 05, 2001
Posts: 118
In cases like this, the JSP specification is indispensible. It documents the syntax and semantics of all JSP elements. You can't really write JSP effectively without referring to it.
The problem is that the <jsp:include> tag (at least in JSP 1.1) requires the flush="true" attribute:
<jsp:include page="HealthPolicies.jsp" flush="true"/>


------------------
Phil Hanna
Sun Certified Programmer for the Java 2 Platform
Author of :
JSP: The Complete Reference
Instant Java Servlets


Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072127686/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072124253/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">Instant Java Servlets</A>
Raj_kurup
Greenhorn

Joined: May 12, 2001
Posts: 4
Thank you very much!
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
If, like me, you can never quite remember the correct magic incantation to sacrifice a virgin Cookie to a clustered servlet by full moon, you will find Sun's JSP 1.1 syntax reference card also indispensable.
- Peter

[This message has been edited by Peter den Haan (edited May 14, 2001).]
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
"Raj_kurup",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error: Invalid jsp:include Tag