User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 423,565 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,604 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1270 | Replies: 2
Reply
Join Date: May 2008
Posts: 11
Reputation: punitdam is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
punitdam's Avatar
punitdam punitdam is offline Offline
Newbie Poster

Problem with <%jsp:include page>

  #1  
May 10th, 2008
I m trying to use <jsp:include page> with apache tomcat 5.5.26 as follows
679:</table>
680:	</td></tr>
681:	<tr><td colspan=2 width="100%">
682:		<jsp:include page="html/policy.html" flush="true"/>
683:	</td></tr>
684:	<tr><td colspan = 2 align="center">
685:		<input type="hidden" name="hide" value="3">

where policy.html is html file to display policy.
while trying to view jsp i m getting following error


org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 682 in the jsp file: /PreReqMail.jsp
org.apache cannot be resolved or is not a field
679:</table>
680:	</td></tr>
681:	<tr><td colspan=2 width="100%">
682:		<jsp:include page="html/policy.html" flush="true"/>
683:	</td></tr>
684:	<tr><td colspan = 2 align="center">
685:	<input type="hidden" name="hide" value="3">


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

can any one help me?
Last edited by peter_budo : May 10th, 2008 at 5:18 am. Reason: Managing code, making it more readable
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 197
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Problem with <%jsp:include page>

  #2  
May 10th, 2008
The <jsp:include tag includes the runtime result of executing another JSP into the one it's contained in.
As your page is a static page, not a JSP, it won't compile to a Java servlet, which is what the error indicates.
Make it a JSP and try again.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote  
Join Date: May 2008
Posts: 2
Reputation: sinan.yk is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sinan.yk sinan.yk is offline Offline
Newbie Poster

Re: Problem with <%jsp:include page>

  #3  
May 13th, 2008
hello. there isn't any problem in your syntax or code. but you probably hadn't written this code into a jsp file in a web project just start a new web project...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 6:42 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC