Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat & Jsp

 
Djamel Djem
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic