This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Help !!!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Help !!!!!!" Watch "Help !!!!!!" New topic
Author

Help !!!!!!

Antoine BLANC
Greenhorn

Joined: Feb 24, 2004
Posts: 6
Plop plop !! ^_^
I have :
-> Apache 2.0.48,
-> Jakarta Tomcat 4.1.27,
-> java 1.4.1_06
-> window XP
and I can't compile JSP pages (examples from Tomcat)!! :'-((
this is mi error message :
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:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
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:256)
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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
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.StandardContext.invoke(StandardContext.java:2416)
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:171)
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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:263)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
Can you help me ??? please !!!
NB : examples with servlet work very well but examples with JSP don't
!!!
[ February 24, 2004: Message edited by: Antoine BLANC ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

We have a forum just for Tomcat issues. I'm moving this topic there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Amigo Mine
Greenhorn

Joined: Feb 15, 2004
Posts: 5
Try running the example JSPs provided with Tomcat. If they compile well then the problem is with your source code.
Antoine BLANC
Greenhorn

Joined: Feb 24, 2004
Posts: 6
Originally posted by Amigo Mine:
Try running the example JSPs provided with Tomcat. If they compile well then the problem is with your source code.

I only try examples from TomCat !!
and they still don't work !!!
Annekee Dufour
Ranch Hand

Joined: Nov 04, 2003
Posts: 41
did you download the jdk or the jre? The jre does not have a compiler.
Antoine BLANC
Greenhorn

Joined: Feb 24, 2004
Posts: 6
Originally posted by Annekee Dufour:
did you download the jdk or the jre? The jre does not have a compiler.

i have downloaded the j2sdk1.4.1_06 !
but the thing I don't understand is that why servlet work and JSP not !!
Annekee Dufour
Ranch Hand

Joined: Nov 04, 2003
Posts: 41
It is talking about line -1 and file null. Is it possible that tomcat cannot find the jsp file? Is the file there? Is it readable? And how about the 'work' directory. Tomcat first creates a servlet there (a .java file), and that's what he tries to compile. Did tomcat create a servlet in a work subdirectory?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Can you see the normal Tomcat startup page at all? That is actually index.jsp so if you see it you are getting at least one JSP to run.
Bill
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Servlets come pre-compiled, and so no compiler need be invoked. For the JSPs (in that version of Tomcat, no longer true for 5.x), the JSPs are not precompiled. So that's one way to start thinking about how servlets and jsps are different, and can exhibit different behaviour. The problem of "servlets work, but JSPs don't" is common.

I'm willing to bet you have a space in the path under which you've installed Tomcat.
c:\Program Files\Apache Group\Apache Tomcat 4.1.27 perhaps ?

CATALINA_HOME doesn't like spaces at all, so try one of these:
1) re-install in a path with no spaces
2) modify your startup.bat script to enclose the path in " " quotes.
[ February 25, 2004: Message edited by: Mike Curwen ]
roy joseph
Greenhorn

Joined: Dec 26, 2003
Posts: 25
if you are using windows98 then spaces should be removed. i used w2000 and xp and spaces were no problem.

[/qoute]
I'm willing to bet you have a space in the path under which you've installed Tomcat.
c:\Program Files\Apache Group\Apache Tomcat 4.1.27 perhaps ?

CATALINA_HOME doesn't like spaces at all, so try one of these:
1) re-install in a path with no spaces
2) modify your startup.bat script to enclose the path in " " quotes.
[ February 25, 2004: Message edited by: Mike Curwen ]


be annoying .. Aku Soku Zan
Geoffrey Falk
Ranch Hand

Joined: Aug 17, 2001
Posts: 171
    
    1
There is most likely an error in your JSP.

Try using Tomcat 5. The error reporting is a little better.

Geoffrey


Sun Certified Programmer for the Java 2 Platform
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by William Brogden:
Can you see the normal Tomcat startup page at all? That is actually index.jsp so if you see it you are getting at least one JSP to run.
Bill



The welcome page and the example JSPs in Tomcat come pre-compiled. So it's possible for them to run but not your own if there is a problem.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Rahul Singh Khokhar
Ranch Hand

Joined: Feb 23, 2005
Posts: 36
Have a look into /TomcatDirectory/Work/Standalone/ and look further for your class file. If it exists then Tomcat is comiling the file successfuly using the installed JDK.
Also, check for the file permissions of your JSP page within winXP (by right-clicking -> properties) if its read-only.
Rahul Singh Khokhar
Ranch Hand

Joined: Feb 23, 2005
Posts: 36
Also further, as Mike & Roy pointed out: U need to remove spaces with WinNT & Win98 for your tomcat installation. Windows XP has no problems with it though.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help !!!!!!