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 Error in jsp while using eclipse 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 "Error in jsp while using eclipse" Watch "Error in jsp while using eclipse" New topic
Author

Error in jsp while using eclipse

vaibhav srivastava
Greenhorn

Joined: Mar 17, 2008
Posts: 23
i have written a very simple jsp page in eclipse.It works fine when I run it by deploying it as a WAR file and Internet Explorer. But when I try to run it by adding tomcat5.0 to eclipse and running it through IDE it shows error 500
Unable to compile class for jsp...

please help


Regards <br />vaibhav srivastava<br />SCJP1.5 , SCWCD1.5
Nickolas Case
Ranch Hand

Joined: Apr 26, 2008
Posts: 98
Does Tomcat start and you see this message on the browser or is this an error seen on the console?

Sounds like you may not have it in the right place. Can you show your directory structure for your project?
vaibhav srivastava
Greenhorn

Joined: Mar 17, 2008
Posts: 23
Yes Tomcat had been started and the error is shown on the console

The JSp file is placed in the WebContent Folder of the Dynamic web project in eclipse.
[ June 05, 2008: Message edited by: vaibhav kumar srivastava ]
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14266
    
  21

Do you get any more information? Is there a stack trace in the console window or the Tomcat logfiles? It may contain a more detailed exception message that should give you an idea of what's wrong with your JSP.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
vaibhav srivastava
Greenhorn

Joined: Mar 17, 2008
Posts: 23
Yes the error shown includes :

Root cause of 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

No idea what to do???
Nickolas Case
Ranch Hand

Joined: Apr 26, 2008
Posts: 98
What is on your build path? Can you create a standard java app in Eclipse and run it? If so, your JDK is set up but everything you need for web stuff may not be in the build path of your web-app. Try looking through your 'Configure build path' options and make sure you have what you need.

If you don't see a problem show us the directory structure of your project.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in jsp while using eclipse