• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Apache Tomcat / jsp HELP!!!

b4u

Golden Member
Hi there,

I'm very new to Apache Tomcat, jsp pages and servlets ... and I can't make it work properly ...

I need some help here ... thanks in advance 🙂.


My system is running a Windows NT 4 Workstation. All WindowsUpdates installed:

[1] So I downloaded and installed j2re-1_4_1_01-windows-i586-i.exe from http://java.sun.com/ (Java 2 Standard Edition 1.4.1.01).
It created the directories C:\Program Files\Java\j2re1.4.1_01 no problem here (i think)


[2] I downloaded Tomcat 4.1.18 from http://www.apache.org/.
Tried to install it, and it requested a JAVA_HOME environment variable to start. Did that in My Computer->Properties->Environments->User Variables section, I introduced JAVA_HOME with value C:\Program Files\Java\j2re1.4.1_01

After that, it installed fine.


[3] I executed "Start Tomcat" from the menu, and after a while, when I think it's just listen, I opened an IE and went to the address http://localhost:8080/. It redirected me to http://localhost:8080/index.jsp, and after a while it displayed the following erro page ... (it's a very big list ... sorry 🙁)

###################### PAGE ERROR ############################
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

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

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file



at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Unknown Source)



--------------------------------------------------------------------------------

Apache Tomcat/4.1.18
###########################################################



What happened here? What am I missing?

If you need any more info, please ask me ... I'll give it to you ...


Thanks 🙂
 
I don't use Tomcat, but I'm pretty sure you'll need the Java2 SDK to run a servlet container. The J2RE does not include a Java compiler to compile servlets.

I haven't used it in a while, but my favorite servlet container was Caucho Resin.
 
I'm not good at decoding all that stuff. It does tell you where the problem is though...

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

An error occurred at line: -1 in the jsp file: null


I suggest going to http://apache.org and hitting the Tomcat section and searching through the support sections. I use Tomcat 3.3 all the time, but luckily it's on Netware 6. Just do some searches with that exact error and mill through the doc. You'll get it. 🙂
 
One more thing. Make sure you have enough RAM on that system. I used to get similar errors on Tomcat from not having enough memory allocated to the java stack. However, this was on Netware again so it may be a little different.
 
Thanks guys, I made it to work, just reinstall the thing again, with jdk1.3.1_03 😉


Now when I go to the page http://localhost:8080/, it tries to access the internet (ask me for proxy authentication) and it (ofcourse) can't find the page ...

For me to access it, I have to disconnect the LAN cable, something I haven't done before (I didn't need to) with the above error.

I have gonne to Connection settings on IE, and checked "Do not use proxy for local addresses" and also write "http://localhost*" on the addresses not to go through proxy ... but still I have to disconnect my comp from LAN for it to work ...


Thanks
 
Back
Top