• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: Invalid jsp:include Tag

 
Raj_kurup
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Raj_kurup
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much!
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic