File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Tomcat + Eclipse + JSP + Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Tomcat + Eclipse + JSP + Servlet" Watch "Tomcat + Eclipse + JSP + Servlet" New topic
Author

Tomcat + Eclipse + JSP + Servlet

Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
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!!!


rawat
SCJP 1.4
Ranganath .S.Junpal
Ranch Hand

Joined: Jan 16, 2005
Posts: 52
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

Joined: Nov 21, 2005
Posts: 138
I am facing the same problem. After refreshing the project from project explorer the jsp compiles.
Pascal Zelen
Greenhorn

Joined: Dec 14, 2005
Posts: 3
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat + Eclipse + JSP + Servlet