File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error: Invalid jsp:include Tag " Watch "Error: Invalid jsp:include Tag " New topic

Error: Invalid jsp:include Tag


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.(
at org.apache.jasper.compiler.JspParseEventListener.handleInclude(
at org.apache.jasper.compiler.DelegatingListener.handleInclude(
at org.apache.jasper.compiler.Parser$Include.accept(
Note: Running on Tomcat 3.2 on win98 OS.
Please help me.

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="" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="" TARGET=_blank rel="nofollow">Instant Java Servlets</A>

Joined: May 12, 2001
Posts: 4
Thank you very much!
Peter den Haan
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

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . 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.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: Error: Invalid jsp:include Tag
It's not a secret anymore!