You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Utech - Han Lim <ha...@unidux.com.sg> on 2001/07/30 09:38:01 UTC

JSP pages cannot be viewed

Hi, I just installed the Apache-1.3.20 and Tomcat-3.2.3, and all running
smoothly until I try to view the .jsp pages at http://localhost:8080/ and I
got this error result :

Error: 500
Location: /examples/jsp/num/numguess.jsp
Internal Servlet Error:

javax.servlet.ServletException: sun/tools/javac/Main
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
	at org.apache.tomcat.core.Handler.service(Handler.java:287)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
	at java.lang.Thread.run(Thread.java:484)

Root cause:
java.lang.NoClassDefFoundError: sun/tools/javac/Main
	at
org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
	at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
	at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
	at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:258)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:268)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
	at org.apache.tomcat.core.Handler.service(Handler.java:287)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
	at java.lang.Thread.run(Thread.java:484)

What is the causes of this problem? And another problem I got is when I try
to create a helloworld.jsp that contain :

<HTML>
<HEAD>
<TITLE></TITLE>
<META name="description" content="">
<META name="keywords" content="">
<META name="generator" content="CuteHTML">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<h1>Hello World - HTML ...</h1>
<h1><% out.println("Hello World - JSP ..."); %></h1>
</BODY>
</HTML>

And I got error when view this page in browser :

2001-07-30 02:50:56 - Ctx( /examples ): 404 R( /examples +
/jsp/helloworld.jsp + null) JSP file not found

Any help and suggestion will be appreciated. Thanks


Han Lin
System Consultant
Unidux Technologies Pte Ltd
(subsidiary of the public-listed Unidux Electronics Ltd)
Tel : (65) 293 4797
Fax : (65) 293 4920
Email : hanlim@unidux.com.sg


RE: JSP pages cannot be viewed

Posted by Utech - Han Lim <ha...@unidux.com.sg>.
I think I'm already set the classpath to point to the servlet.jar as you can
see it obviously from my environment setting. Any else suggestion? I still
cannot view the .jsp pages, and got stuck with it:(

Thanks.

regards,
Han Lin

-----Original Message-----
From: AN Sathe [mailto:amitsathe@jbmtpune.com]
Sent: Monday, July 30, 2001 6:48 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: JSP pages cannot be viewed
Sensitivity: Personal


I think you need to set the classpath to point to the servet.jar files


ans
-----Original Message-----
From: tomcat-user@jakarta.apache.org
[mailto:tomcat-user@jakarta.apache.org]
Sent: Tuesday, July 31, 2001 3:05 AM
To: tomcat-user@jakarta.apache.org
Subject: RE: JSP pages cannot be viewed
Sensitivity: Personal


Yes, I'm sure I am using the JDK and JRE too, here is my Environment
setting :

TOMCAT_HOME=/usr/local/jakarta-tomcat
LANG=en_US
JAVA_HOME=/usr/java/jdk1.3.1
LOGNAME=hanlim
SHLVL=2
SHELL=/bin/bash
HOSTTYPE=i386
OSTYPE=linux-gnu
HISTSIZE=10
TERM=xterm
HOME=/root
PATH=/usr/java/jdk1.3.1/bin:/usr/java/jdk1.3.1/lib/tools.jar:/usr/local/
jakarta-servletapi/lib/servlet.jar:/usr/local/bin:/bin:/usr/bin:/usr/X11
R6/bin:/home/hanlim/bin
_=/usr/bin/env

I think I set all thing properly but still cannot view the .jsp file.

And according to Emir Alikadic's recommended website
http://marc.theaimsgroup.com/?l=tomcat-user&m=97870338519857&w=2, I'm
not understand this statement :

/* One word of caution though: on a windows system, even if you
installed
the development kit, a JRE is installed as well.  Make sure you set your
JAVA_HOME environment variable to correct one.
(On my system the JDK is on c:\java\jdk1.3 and the JRE on c:\program
files\JavaSoft\JRE\1.3) */

How can I set the JRE path?



Thanks for help and suggestion.

regards,
Han Lin





RE: JSP pages cannot be viewed

Posted by AN Sathe <am...@jbmtpune.com>.
I think you need to set the classpath to point to the servet.jar files


ans
-----Original Message-----
From: tomcat-user@jakarta.apache.org
[mailto:tomcat-user@jakarta.apache.org]
Sent: Tuesday, July 31, 2001 3:05 AM
To: tomcat-user@jakarta.apache.org
Subject: RE: JSP pages cannot be viewed
Sensitivity: Personal


Yes, I'm sure I am using the JDK and JRE too, here is my Environment
setting :

TOMCAT_HOME=/usr/local/jakarta-tomcat
LANG=en_US
JAVA_HOME=/usr/java/jdk1.3.1
LOGNAME=hanlim
SHLVL=2
SHELL=/bin/bash
HOSTTYPE=i386
OSTYPE=linux-gnu
HISTSIZE=10
TERM=xterm
HOME=/root
PATH=/usr/java/jdk1.3.1/bin:/usr/java/jdk1.3.1/lib/tools.jar:/usr/local/
jakarta-servletapi/lib/servlet.jar:/usr/local/bin:/bin:/usr/bin:/usr/X11
R6/bin:/home/hanlim/bin
_=/usr/bin/env

I think I set all thing properly but still cannot view the .jsp file. 

And according to Emir Alikadic's recommended website
http://marc.theaimsgroup.com/?l=tomcat-user&m=97870338519857&w=2, I'm
not understand this statement :

/* One word of caution though: on a windows system, even if you
installed
the development kit, a JRE is installed as well.  Make sure you set your
JAVA_HOME environment variable to correct one.
(On my system the JDK is on c:\java\jdk1.3 and the JRE on c:\program
files\JavaSoft\JRE\1.3) */

How can I set the JRE path?



Thanks for help and suggestion.

regards,
Han Lin



RE: JSP pages cannot be viewed

Posted by Han Lin <ha...@unidux.com.sg>.
Yes, I'm sure I am using the JDK and JRE too, here is my Environment
setting :

TOMCAT_HOME=/usr/local/jakarta-tomcat
LANG=en_US
JAVA_HOME=/usr/java/jdk1.3.1
LOGNAME=hanlim
SHLVL=2
SHELL=/bin/bash
HOSTTYPE=i386
OSTYPE=linux-gnu
HISTSIZE=10
TERM=xterm
HOME=/root
PATH=/usr/java/jdk1.3.1/bin:/usr/java/jdk1.3.1/lib/tools.jar:/usr/local/
jakarta-servletapi/lib/servlet.jar:/usr/local/bin:/bin:/usr/bin:/usr/X11
R6/bin:/home/hanlim/bin
_=/usr/bin/env

I think I set all thing properly but still cannot view the .jsp file. 

And according to Emir Alikadic's recommended website
http://marc.theaimsgroup.com/?l=tomcat-user&m=97870338519857&w=2, I'm
not understand this statement :

/* One word of caution though: on a windows system, even if you
installed
the development kit, a JRE is installed as well.  Make sure you set your
JAVA_HOME environment variable to correct one.
(On my system the JDK is on c:\java\jdk1.3 and the JRE on c:\program
files\JavaSoft\JRE\1.3) */

How can I set the JRE path?



Thanks for help and suggestion.

regards,
Han Lin


RE: JSP pages cannot be viewed

Posted by Deacon Marcus <de...@wwtech.pl>.
Are you sure you're using JDK instead of JRE ?
Greetings, deacon Marcus

> -----Original Message-----
> From: Utech - Han Lim [mailto:hanlim@unidux.com.sg]
> Sent: Monday, July 30, 2001 9:38 AM
> To: tomcat-user@jakarta.apache.org
> Subject: JSP pages cannot be viewed
> Sensitivity: Personal
>
>
> Hi, I just installed the Apache-1.3.20 and Tomcat-3.2.3, and all running
> smoothly until I try to view the .jsp pages at
> http://localhost:8080/ and I
> got this error result :
>
> Error: 500
> Location: /examples/jsp/num/numguess.jsp
> Internal Servlet Error:
>
> javax.servlet.ServletException: sun/tools/javac/Main
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> 	at org.apache.tomcat.core.Handler.service(Handler.java:287)
> 	at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> 	at
> org.apache.tomcat.core.ContextManager.internalService(ContextManag
> er.java:79
> 7)
> 	at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> 	at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnec
> tion(HttpC
> onnectionHandler.java:213)
> 	at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> 	at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> 	at java.lang.Thread.run(Thread.java:484)
>
> Root cause:
> java.lang.NoClassDefFoundError: sun/tools/javac/Main
> 	at
> org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler
> .java:136)
> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
> 	at
> org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
> 	at
> org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
> 	at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
> 	at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNeces
> sary(JspSe
> rvlet.java:258)
> 	at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Jsp
> Servlet.ja
> va:268)
> 	at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> 	at org.apache.tomcat.core.Handler.service(Handler.java:287)
> 	at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> 	at
> org.apache.tomcat.core.ContextManager.internalService(ContextManag
> er.java:79
> 7)
> 	at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> 	at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnec
> tion(HttpC
> onnectionHandler.java:213)
> 	at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> 	at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> 	at java.lang.Thread.run(Thread.java:484)
>
> What is the causes of this problem? And another problem I got is
> when I try
> to create a helloworld.jsp that contain :
>
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> <META name="description" content="">
> <META name="keywords" content="">
> <META name="generator" content="CuteHTML">
> </HEAD>
> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
> <h1>Hello World - HTML ...</h1>
> <h1><% out.println("Hello World - JSP ..."); %></h1>
> </BODY>
> </HTML>
>
> And I got error when view this page in browser :
>
> 2001-07-30 02:50:56 - Ctx( /examples ): 404 R( /examples +
> /jsp/helloworld.jsp + null) JSP file not found
>
> Any help and suggestion will be appreciated. Thanks
>
>
> Han Lin
> System Consultant
> Unidux Technologies Pte Ltd
> (subsidiary of the public-listed Unidux Electronics Ltd)
> Tel : (65) 293 4797
> Fax : (65) 293 4920
> Email : hanlim@unidux.com.sg
>
>