This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in jsp while using eclipse

 
vaibhav srivastava
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Nickolas Case
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15203
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
vaibhav srivastava
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic