[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Error Loading JSP!

Posted on 2004-09-12
6
Medium Priority
?
239 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 136 total points
ID: 12040912
you also need the JDK installed
0
 

Assisted Solution

by:kheefatt
kheefatt earned 132 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 132 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

While there are many new features for iOS 11, these are the five that can improve your digital lifestyle.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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