Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Error Loading JSP!

Posted on 2004-09-12
6
233 Views
Last Modified: 2010-04-01
Hi experts,

i just have my tomcat 5.0.2.7 setup on windows 2000 SP4 station. However, no matter what jsp file i run, the browser returns following error.

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.

Is that anything wrong with my config?

Please help.

Thank you very much,

Goran
0
Comment
Question by:goranwong
6 Comments
 
LVL 92

Accepted Solution

by:
objects earned 34 total points
ID: 12040912
you also need the JDK installed
0
 

Assisted Solution

by:kheefatt
kheefatt earned 33 total points
ID: 12041515
When j2sdk is installed, u need to set the environment variables for it. I think windows 2000 and windows xp is almost the same. Go to settings > control panel > system. Goto Advanced tab and u should see environment variables button there. Under system variables, click new and insert the details. Under variable name, put JAVA_HOME. Under variable value, put your jdk path (for example I put it as C:\Program Files\j2sdk1.4.2_04).
0
 
LVL 9

Assisted Solution

by:ronan_40060
ronan_40060 earned 33 total points
ID: 12042094
Hi There goran

Well like Objects mentioned JDK is the first thing you shud download and install
The only small doubt I have is whether J2SE 1.4 version is compatible with Tomcat 5 and on ?? else we cud have J2SE 1.5 with Tomcat 5
For the deployment of Tomcat on various plateform
Please do NOT forget to go through the following links ; all explained :)
http://www.cnr.berkeley.edu/~salazar/apache_tomcat.html
http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html
http://www.devside.net/web/server/windows/Tomcat
http://www.connecties.com/cymulacrum/tomcat5/book1.html

------------------------------------------------------------------------------------------------------------------------------------
After you install Tomcat
For the Deployment of JSPs

a>Copy your WAR file to the TOMCAT_HOME/webapps directory.

b>Add a new Context entry to the TOMCAT_HOME/conf/server.xml file, setting the values for the path and docBase to the name of your web application.

c>Restart Tomcat after completing these steps. .

on the browser

http://localhost/urapp/

 Few notes
IN  TOMCAT_HOME/webapps directory, you will see a new directory matching the name of your WAR file. This is where your working web application now exists. When Tomcat starts it will extract all WAR files that have been recently placed into the TOMCAT_HOME/webapps directory.
 web.xml and  jsp will be inside the war file.

for JSPs
a>You need to  create a folder name for example myapp in the webapps folder, place your jsp there  i.e <tomcat dir>/webapps/myapp
and restart tomcat and try
http://localhost:8080/myapp/Hello1.jsp

Let us know How it goes

Good Luck
Ronan

0
 
LVL 2

Expert Comment

by:arnon81
ID: 12068456
Hi Goran,
this is what I do in my computer
c:\tomcat 5.0.2.7>set JAVA_HOME=C:\j2sdk1.4.1_01  
c:\tomcat 5.0.2.7>cd bin
and then run tomcat


0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Fisheye tool 2 116
some methods private some are not 8 218
Is possible to make a jsp script work with oracle wallet? 7 104
maven j2ee examles 2 60
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question