aspose file tools*
The moose likes Servlets and the fly likes Tomcat & Jsp 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 "Tomcat & Jsp" Watch "Tomcat & Jsp" New topic
Author

Tomcat & Jsp

Djamel Djem
Greenhorn

Joined: May 12, 2001
Posts: 3
Hi Friends,
Please Help me.
I have installed Tomcat. I have set the environment variables as :
SET JAVA_HOME=C:\JDK1.3
SET CLASSPATH=C:\JDK1.3\lib\tools.jar;C:\jakarta-tools\servlet2-.2.0.jar;%CLASSPATH%;
SET TOMCAT_HOME=C:\jakarta-tomcat-3.2.1
SET PATH=$JAVA_HOME\bin;%PATH%
When I enter http://localhost:8080 I get the home page, but My problem is when I try to run JSP file from Tomcat examples folder I receive the following error :
Error: 500
Location: /examples/jsp/num/numguess.jsp
Internal Servlet Error:
javax.servlet.ServletException
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.NoSuchMethodError
at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:209)
at jsp.num._0002fjsp_0002fnum_0002fnumguess_0002ejspnumguess_jsp_0._jspService(_0002fjsp_0002fnum_0002fnumguess_0002ejspnumguess_jsp_0.java:150)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
Do you possibly have an earlier version of servlet.jar hanging around? Maybe in JAVA_HOME\jre\lib\ext directory?
Bill
Phil Hanna
Ranch Hand

Joined: Apr 05, 2001
Posts: 118
SET CLASSPATH=C:\JDK1.3\lib\tools.jar;C:\jakarta-tools\servlet2-.2.0.jar;%CLASSPATH%
What is that "servlet2-.2.0.jar" doing in your classpath? Tomcat comes with its own servlet.jar, in the tomcat/lib directory. Why not change the AUTOEXEC entry to use the Tomcat version.
------------------
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>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat & Jsp