aspose file tools*
The moose likes Struts and the fly likes Struts Example not working! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Example not working!" Watch "Struts Example not working!" New topic
Author

Struts Example not working!

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Guys,

I'm getting the following error when I tried to run my sample Struts application in Eclipse WTP IDE. I'm sure that JAVA_HOME is set properly.

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
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.


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

Apache Tomcat/5.0.28


SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Any help guys??
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

I'm sure that my JAVA HOME is set! I'm able to run other applications but not the ones that is based on Struts???
Nick Williamson
Ranch Hand

Joined: Jan 06, 2007
Posts: 73
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Of course my JAVA_HOME points to JDK. Do you mean in the environment variables?? It does point to JDK. But still I don't know why I'm unable to work with that example?? Please help me in this regard...Just stuck with this for the past 3 days. Both my home system and office system throws the same problem. In both my machines below are my path and classpath settings,

Path : C:\Program Files\Java\jdk1.5_11\bin

Classpath : C:\Program Files\Java\jre1.5_11\lib

Where does JAVA_HOME comes to play?? Is there any additional setting that I have to do in Eclipse itself??
Nick Williamson
Ranch Hand

Joined: Jan 06, 2007
Posts: 73
JAVA_HOME should be another environment variable on your computer.

JAVA_HOME
value should be C:\Program Files\Java\jdk1.5_11

(path from your previous post).
 
Consider Paul's rocket mass heater.
 
subject: Struts Example not working!
 
Similar Threads
environmental variable issue
With JBoss 4.2 and elipse 3.3
Struts Error: while deploying
JasperException Error
JAVA_HOME does not point to the JDK