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

Not able to run JSP

Prabhat Gupta
Ranch Hand

Joined: Jan 22, 2008
Posts: 135
Hi Every One!!

When i am trying to run JSP i am getting error like

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

but i have already set system variable as
JAVA_HOME=C:\Program Files\Java\jdk1.5.0_04;

Would you tell how can i fix it?

With thanks in advance:

Prabhat
[ March 13, 2008: Message edited by: Bear Bibeault ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What version of Tomcat are you using?
How did you install it?
How did you start it up?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10288
    
168

As Ben mentioned, please post the details.

JAVA_HOME=C:\Program Files\Java\jdk1.5.0_04;


Also, make sure that you remove the semi-colon in the JAVA_HOME value. It should just be:



[My Blog] [JavaRanch Journal]
Prabhat Gupta
Ranch Hand

Joined: Jan 22, 2008
Posts: 135
quote
--------------------------------------
What version of Tomcat are you using?
How did you install it?
How did you start it up?
--------------------------------------
I m using Tomcat5.0..server runs fine..i m getting the Index.jsp page but the jsp page that i have created say A.jsp , i am not able to run.

The environment variables that i have set are

CLASSPATH =C:\Program Files\Java\JDK 1.5.0_04\lib\tools.jar;C:\TomCat 5.0\Common\lib\servlet_api.jar

JAVA_HOME=C:\Program Files\Java\JDK 1.5.0_04
JRE_HOME=C:\Program Files\Java\JRE 1.5.0_04


One more thing when i m running the same jsp in ECLIPSE it runs fine.But
It is getting problem when i m using TOMCAT.I guess the problem is some environment variable setting that i m not able to figure out.

Would you suggest what should i do?

Thanks & Regards

Prabhat
Arvind Mishra
Greenhorn

Joined: Jul 04, 2007
Posts: 28
Hi

I think its not able to find rt.jar .
Try to Add this in your SYSTEM Path


Regards<br />Arvind Mishra<br />SCJP<br />SCWCD<br />IBM SOA Associate
Prabhat Gupta
Ranch Hand

Joined: Jan 22, 2008
Posts: 135
Thnx all!!
now it is working..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to run JSP