• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot view Tomcat/JSP example source

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody!
Small problem. Actually two that are probably inter-realted. I have Tomcat up and running but it only starts if I use the command "tomcat run". Any other variation will not work. Usually the startSErver error -- cannot find.
JSP's actually execute, but when I try to view the code through the browser (using pre-set Tomcat examples-Like NumberGuess) I get page not found error. I can find the pages and view the source in textpad but not through the hyperlink in the browser.
My env vars:
CLASSPATH= C:\WINNT\system32;C:\WINNT\System32\Wbem;C:\WINNT\Java\Classes\RxAssistant.zip;c:\ApacheGroup\tomcat\lib\ant.jar;c:\ApacheGroup\tomcat\lib\jasper.jar;c:\ApacheGroup\tomcat\lib\serv let.jar;c:\ApacheGroup\tomcat\lib\webserver.jar;c:\ApacheGroup\tomcat\lib\xml.jar
JAVA_HOME=c:\jdk1.3
PATH=c:\jdk1.3\bin
TOMCAT_HOME=c:\tomcat
These are set via start->settings->CP->system
Then I run a .bat that adds these for no real reason I believe. I was having so much trouble getting vars right that it works like this and I didn;t want to change anything unless told to do so by someone who knows that they are doing.
set JAVA_HOME=C:\jdk1.3
set TOMCAT_HOME=C:\ApacheGroup\tomcat
set path=%path%;JAVA_HOME\bin;
set classpath=%classpath%;JAVA_HOME\lib\tools.jar;.;
OS: Win2000
I hope someone can help me out with this.
Thanks!
Ronald

[This message has been edited by Ronald Whalen (edited April 03, 2001).]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be seeing some kind of error message in the Tomcat console window. Normally if a JSP fails after creating a page it is because tools.jar is missing and the JVM can't compile the page to a class file.
Bill
 
Ronald Whalen
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bill,
I have the JAVA_HOME\lib\tools.jar in my classpath, if that is what you were referring to.
I copied this error message from the tomcat .log when I tried to view the source of the JSP through the browser window:Context

log: path="" Socket Exception/index.html
Context log: path="/examples" Socket Exception/examples/jsp/index.html
Context log: path="/examples" Error in jsp service() : Invalid JSP file /jsp/num/numguess.jsp
javax.servlet.ServletException: Invalid JSP file /jsp/num/numguess.jsp
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
at jsp._0002fjsp_0002fsource_0002ejspsource_jsp_0._jspService(_0002fjsp_0002fsource_0002ejspsource_jsp_0.java:86)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)
Context log: path="/examples" <b>Internal Servlet Error:</b><br>
<pre>
javax.servlet.ServletException: Invalid JSP file /jsp/num/numguess.jsp
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
at jsp._0002fjsp_0002fsource_0002ejspsource_jsp_0._jspService(_0002fjsp_0002fsource_0002ejspsource_jsp_0.java:86)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)
</pre>
<b>Root cause:</b>
<pre>
javax.servlet.jsp.JspTagException: Invalid JSP file /jsp/num/numguess.jsp
at examples.ShowSource.doEndTag(ShowSource.java:26)
at jsp._0002fjsp_0002fsource_0002ejspsource_jsp_0._jspService(_0002fjsp_0002fsource_0002ejspsource_jsp_0.java:76)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)
</pre>
Ronald
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic