Meaningless Drivel is fun!*
The moose likes Tomcat and the fly likes Unable to run a jsp file ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Unable to run a jsp file ?" Watch "Unable to run a jsp file ?" New topic
Author

Unable to run a jsp file ?

Tanka Banerjee
Ranch Hand

Joined: Aug 16, 2006
Posts: 64
Dear all,
I have made folder Tatonhunu inside C:\Tomcat 5.0\webapps of my Tomcat 5.0 folder installed in my machine .

Inside web-inf folder there is classes . I have put the Tankataton.jsp inside C:\Tomcat 5.0\webapps\Tatonhunu and i am running my start.bat inside the tomcat and launching the tomcat. I am typing localhost:8080 inside the internet explorer and getting tomcat console where i type admin and click ok
to go inside tomcat manager. It is showing up my project that is Tatonhunu.
When i am trying to run Tankataton.jsp . It is showing :
*************************************************************
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
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)


root cause

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)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.27

*************************************************************************

satishkumar janakiraman
Ranch Hand

Joined: May 03, 2004
Posts: 334
Its because your JDK is not in the classpath. First set jdk in your classpath.

bye for now
sat
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by satishkumar janakiraman:
Its because your JDK is not in the classpath. First set jdk in your classpath.


Not entirely true.

Moving to the Apache/Tomcat forum


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Tomcat --prior to version 5.5-- requires a full JDK.
How it finds the JDK depends on the OS and how you've installed and are starting Tomcat.

From your path, we can see you're using a Windows box.
How did you install Tomcat (zip file or .exe file)?
How are you starting it (batch files or as a Windows Service)?
Tanka Banerjee
Ranch Hand

Joined: Aug 16, 2006
Posts: 64
JAVA_HOME
C:\jdk1.5.0_07\bin;
JDK_HOME
C:\jdk1.5.0_07\bin;
CATALINA_HOME
C:\Tomcat 5.0\bin;C:\Tomcat 5.0\common\lib;
classpath
%classpath%;.\;D:\hsqldb\libhsqldb.jar;D:\hsqldb\lib.servlet.jar;C:\jdk1.5.0_07\bin;C:\jre1.5.0_07\bin;
---------------------------------------------------------------------------
My Dear Friends,
I have already set all these variables in the Environmental variables in
My Computer. I am using Windows XP.
Best Regards
Tanka Banerjee
S Raman
Greenhorn

Joined: Mar 29, 2006
Posts: 16
JAVA_HOME should not point to bin directory
JDK_HOME ALSO pointing to bin directory
remove bin in the declaration
S Raman
Greenhorn

Joined: Mar 29, 2006
Posts: 16
also classpath should contain paths of jar files not executables directory like bin
Tanka Banerjee
Ranch Hand

Joined: Aug 16, 2006
Posts: 64
Originally posted by Ben Souther:
Tomcat --prior to version 5.5-- requires a full JDK.
How it finds the JDK depends on the OS and how you've installed and are starting Tomcat.

From your path, we can see you're using a Windows box.
How did you install Tomcat (zip file or .exe file)?
How are you starting it (batch files or as a Windows Service)?


I think it as .exe file as file type is shown
as an application.
I am starting Windows Service.



[ November 22, 2006: Message edited by: Tanka Banerjee ]
[ November 22, 2006: Message edited by: Tanka Banerjee ]
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

try this configuration steps of Tomcat 5.0.

Configure Tomcat

it might be helpful to you to resolve your confirguation problem of Tomcat.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
 
subject: Unable to run a jsp file ?
 
Similar Threads
JasperException Error
environmental variable issue
struts installation exception
Unable to run a jsp file ?
Struts Error: while deploying