Solved

Error Loading JSP!

Posted on 2004-09-12
6
236 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
[X]
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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apache server configuration 7 92
Adjusting width and height of dropdown produced using select n option HTML tags 4 95
oracle fusion vs MQ 2 128
spring maven example issues 3 42
This article was initially published on Monitis Blog, you can read it here . When it comes to deciding which approach to website performance monitoring is best for your business, unfortunately, like so many options in life . . . it depends. In t…
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 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