  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | Tomcat error while using a class with JSP! | Tomcat error while using a class with JSP! 2003-12-09 - By GuptaD@(protected)
Back
Hi All,
I am new to Tomcat so I would really appreciate if somebody could help me in this.
I have Tomcat 4.1.29 installed on my windows 2000 machine. At the same level as examples is in Tomcat path, I've created a directory called boots(this is my application directory.) and have a index.jsp under boots and a class called PVDatabase.class under C:\Program Files\Apache Group\Tomcat 4.1\webapps\boots\WEB-INF\classes directory where C:\Program Files\Apache Group\Tomcat 4.1 is my CATALINA_HOME variable.
I have modified server.xml to include the context boots there. When I try to call this class from my index.jsp it gives me the following error.
org.apache.jasper.JasperException : Unable to compile class for JSP
An error occurred at line: 2 in the jsp file: /index.jsp
Generated servlet error: [javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\boots\index_jsp.java:44: cannot resolve symbol symbol : class PVDatabase location: class org.apache.jsp.index_jsp PVDatabase PV1 = null; ^
An error occurred at line: 2 in the jsp file: /index.jsp
Generated servlet error: C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\boots\index_jsp.java:46: cannot resolve symbol symbol : class PVDatabase location: class org.apache.jsp.index_jsp PV1 = (PVDatabase) pageContext.getAttribute("PV1", PageContext.PAGE_SCOPE); ^
An error occurred at line: 2 in the jsp file: /index.jsp
Generated servlet error: C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\boots\index_jsp.java:49: cannot resolve symbol symbol : class PVDatabase location: class org.apache.jsp.index_jsp PV1 = (PVDatabase) java.beans.Beans (this.getClass().getClassLoader(), "PVDatabase"); ^ 3 errors
at org.apache.jasper.compiler.DefaultErrorHandler (DefaultErrorHandle r.java:130) at org.apache.jasper.compiler.ErrorDispatcher (ErrorDispatcher.java:2 93) at org.apache.jasper.compiler.Compiler (Compiler.java:353) at org.apache.jasper.compiler.Compiler (Compiler.java:370) at org.apache.jasper.JspCompilationContext (JspCompilationContext.java:4 73) at org.apache.jasper.servlet.JspServletWrapper (JspServletWrapper.java:1 90) at org.apache.jasper.servlet.JspServlet (JspServlet.java:295) at org.apache.jasper.servlet.JspServlet (JspServlet.java:241) at javax.servlet.http.HttpServlet (HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain (Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve (StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase (ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve (StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase (ContainerBase.java:995) at org.apache.catalina.core.StandardContext (StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve (StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve (ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase (ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve (StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase (ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter (CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor (Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.processConne ction(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.jav a:666) at java.lang.Thread (Thread.java:536)
I am not really sure as what am I missing here in configuration. I'm sending my server.xml and index.jsp with this mail.. Looking forward to hear from you very soon.
Thanks & Regards,
Divya <<server.xml>> <<index.jsp>>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12"> <TITLE>Tomcat error while using a class with JSP!</TITLE> </HEAD> <BODY> <BR>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial">Hi All,</FONT> </P>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial"> I am new to Tomcat so I would really appreciate if somebody could help me in this.</FONT> </P>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial">I have Tomcat 4.1.29 installed on my windows 2000 machine. At the same level as examples is in Tomcat path, I've created a directory called boots(this is my application directory.) and have a index.jsp under boots and a class called PVDatabase.class under C: \Program Files\Apache Group\Tomcat 4.1\webapps\boots\WEB-INF\classes directory where C:\Program Files\Apache Group\Tomcat 4.1 is my CATALINA_HOME variable.< /FONT></P>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial"> I have modified server.xml to include the context boots there. When I try to call this class from my index.jsp it gives me the following error.</FONT></P> <BR>
<P><FONT SIZE=2 FACE="Courier New">org.apache.jasper.JasperException : Unable to compile class for JSP</FONT> </P>
<P><FONT SIZE=2 FACE="Courier New">An error occurred at line: 2 in the jsp file : /index.jsp</FONT> </P>
<P><FONT SIZE=2 FACE="Courier New">Generated servlet error:</FONT> <BR><FONT SIZE=2 FACE="Courier New"> [javac] Compiling 1 source file</FONT> </P>
<P><FONT SIZE=2 FACE="Courier New">C:\Program Files\Apache Group\Tomcat 4.1 \work\Standalone\localhost\boots\index_jsp.java:44: cannot resolve symbol</FONT> <BR><FONT SIZE=2 FACE="Courier New">symbol : class PVDatabase </FONT> <BR><FONT SIZE=2 FACE="Courier New">location: class org.apache.jsp.index_jsp< /FONT> <BR><FONT SIZE=2 FACE="Courier New"> PVDatabase PV1 = null;</FONT> <BR><FONT SIZE=2 FACE="Courier New"> ^</FONT> </P> <BR> <BR>
<P><FONT SIZE=2 FACE="Courier New">An error occurred at line: 2 in the jsp file : /index.jsp</FONT> </P>
<P><FONT SIZE=2 FACE="Courier New">Generated servlet error:</FONT> <BR><FONT SIZE=2 FACE="Courier New">C:\Program Files\Apache Group\Tomcat 4.1 \work\Standalone\localhost\boots\index_jsp.java:46: cannot resolve symbol</FONT> <BR><FONT SIZE=2 FACE="Courier New">symbol : class PVDatabase </FONT> <BR><FONT SIZE=2 FACE="Courier New">location: class org.apache.jsp.index_jsp< /FONT> <BR><FONT SIZE=2 FACE="Courier New"> PV1 = (PVDatabase) pageContext.getAttribute("PV1", PageContext.PAGE _SCOPE);</FONT> <BR><FONT SIZE=2 FACE="Courier New"> ^</FONT> </P> <BR> <BR>
<P><FONT SIZE=2 FACE="Courier New">An error occurred at line: 2 in the jsp file : /index.jsp</FONT> </P>
<P><FONT SIZE=2 FACE="Courier New">Generated servlet error:</FONT> <BR><FONT SIZE=2 FACE="Courier New">C:\Program Files\Apache Group\Tomcat 4.1 \work\Standalone\localhost\boots\index_jsp.java:49: cannot resolve symbol</FONT> <BR><FONT SIZE=2 FACE="Courier New">symbol : class PVDatabase </FONT> <BR><FONT SIZE=2 FACE="Courier New">location: class org.apache.jsp.index_jsp< /FONT> <BR><FONT SIZE=2 FACE="Courier New"> PV1 = (PVDatabase) java.beans.Beans (this .getClass().getClassLoader(), "PVDatabase");</FONT> <BR><FONT SIZE=2 FACE="Courier New"> ^</FONT> <BR><FONT SIZE=2 FACE="Courier New">3 errors</FONT> </P> <BR>
<P> <FONT SIZE=2 FACE="Courier New" >at org.apache.jasper.compiler.DefaultErrorHandler  (DefaultErrorHandler.java:130)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.jasper.compiler.ErrorDispatcher (ErrorDispatcher.java :293)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.jasper.compiler.Compiler (Compiler.java:353)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.jasper.compiler.Compiler (Compiler.java:370)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.jasper.JspCompilationContext (JspCompilationContext.java :473)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.jasper.servlet.JspServletWrapper (JspServletWrapper.java :190)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.jasper.servlet.JspServlet (JspServlet.java:295)< /FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.jasper.servlet.JspServlet (JspServlet.java:241)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at javax.servlet.http.HttpServlet (HttpServlet.java:853)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.ApplicationFilterChain  (ApplicationFilterChain.java:247)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.ApplicationFilterChain  (ApplicationFilterChain.java:193)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardWrapperValve (StandardWrapperValve .java:256)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext .invokeNext(StandardPipeline.java:643)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline (StandardPipeline.java:480)< /FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.ContainerBase (ContainerBase.java:995)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardContextValve (StandardContextValve .java:191)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext .invokeNext(StandardPipeline.java:643)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline (StandardPipeline.java:480)< /FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.ContainerBase (ContainerBase.java:995)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardContext (StandardContext.java:2417)< /FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardHostValve (StandardHostValve.java:180 )</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext .invokeNext(StandardPipeline.java:643)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve .java:171)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext .invokeNext(StandardPipeline.java:641)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.valves.ErrorReportValve (ErrorReportValve.java:172 )</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext .invokeNext(StandardPipeline.java:641)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline (StandardPipeline.java:480)< /FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.ContainerBase (ContainerBase.java:995)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardEngineValve (StandardEngineValve.java :174)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext .invokeNext(StandardPipeline.java:643)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.StandardPipeline (StandardPipeline.java:480)< /FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.catalina.core.ContainerBase (ContainerBase.java:995)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.coyote.tomcat4.CoyoteAdapter (CoyoteAdapter.java:193)< /FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.coyote.http11.Http11Processor (Http11Processor.java:781)< /FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler .processConnection(Http11Protocol.java:549)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)< /FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool .java:666)</FONT> <BR> <FONT SIZE=2 FACE="Courier New" >at java.lang.Thread (Thread.java:536)</FONT> </P> <BR>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial"> </FONT> </P>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial"> I am not really sure as what am I missing here in configuration. I'm sending my server.xml and index .jsp with this mail..</FONT></P>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial">Looking forward to hear from you very soon.</FONT> </P>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial">Thanks & Regards,</FONT> </P> <BR>
<P><FONT COLOR="#008080" SIZE=2 FACE="Arial">Divya</FONT> <BR><FONT FACE="Arial" SIZE=2 COLOR="#000000"> <<server.xml>> < /FONT><FONT FACE="Arial" SIZE=2 COLOR="#000000"> <<index.jsp>> < /FONT> </P>
</BODY> </HTML> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected) For additional commands, e-mail: tomcat-user-help@(protected)
|
|
 |