Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat + Eclipse + JSP + Servlet

 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

After i configured Eclipse 3.0 for tomcat 5.0 ..i tried to test it.
I wrote a simple JSP page but when i ran it...it gave me this error..

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)


i did all changes in JAVA_HOME Variable but still it give me same error..

can ny body guide me??

and can also somebody give me a basic tutroial of writing JSP and Servlets using Eclipse IDE 3.0 and Tomcat 5.0..

Waiting for reply!!!
 
Ranganath .S.Junpal
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You need to set the classpath to java_home and catalina variables for your system..
I think after that it works fine

Ranganath.S
 
Hemant Agarwal
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing the same problem. After refreshing the project from project explorer the jsp compiles.
 
Pascal Zelen
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there, I think you should look in Windows >> Preferences >> Java >> Installed JREs. Make sure the JDK is checked there instead of the JRE. If there is no JDK1.5 in the list then add it by clicking the 'add' button and search for your JDK directory (something like C:\Program Files\Java\jdk1.5.0_05). Hope it works then!

Greetz Pascal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic