tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <randy.lay...@aswethink.com>
Subject RE: Internal Server Error
Date Wed, 30 May 2001 10:56:28 GMT

	Your problem is that you didn't import the class.  When Tomcat
generates the classes, it puts them into packages according to your
directory structure.  All classes therefore have a package and any classes
that are not in a package are not accessible unless each is explicitly
imported.  You need to add something like:
<%@ page import="Login,TimeSpent" %>
to your JSP.

	Incidentally, it appears that you are trying to do some
authentication.  You might looking into the SimpleRealm and JDBCRealm
classes of Tomcat, which are extensible for your own purposes.

	Randy


> -----Original Message-----
> From: Nidhish Abraham [mailto:nidhish_a@usa.net]
> Sent: Wednesday, May 30, 2001 2:16 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Internal Server Error 
> 
> 
> Sir ,
> 
>  I'm working on a JSP project , i'm facing the following problem
> 
>  I was able to access all the jsp's ,jpegs, htm,html's etc
> 
>  There was an Internal Servlet Error: when i try to access session
> variable(from the next pages) after creating the session variable 
> in the home page.
> 
> whenever  i try to access the other pages the following error 
> is reported 
> 
> (HERE: Login and TimeSpent are session variables , which are created 
>  in the home page )
> 
> 
> But these class files are created in the work directory automatically 
> created by TomCat server.
> 
>  
> 
> ==============================================================
> =========
> Error: 500
> 
> Location: /web/VC/vc2.jsp
> 
> Internal Servlet Error:
> 
> org.apache.jasper.JasperException: Unable to compile class 
> for JSPerror: File
> C:\jakarta-tomcat\work\localhost_8080%2Fweb\VC\Login.class 
> does not contain
> type VC.Login as expected, but type Login. Please remove the 
> file, or make
> sure it appears in the correct subdirectory of the class path.
> C:\jakarta-tomcat\work\localhost_8080%2Fweb\_0002fVC_0002fvc_0
> 0032_0002ejspvc2_jsp_0.java:67:
> Class VC.Login not found.
>                 Login lo=(Login)session.getValue("login");
>                 ^
> C:\jakarta-tomcat\work\localhost_8080%2Fweb\_0002fVC_0002fvc_0
> 0032_0002ejspvc2_jsp_0.java:67:
> Class VC.Login not found.
>                 Login lo=(Login)session.getValue("login");
>                           ^
> error: File 
> C:\jakarta-tomcat\work\localhost_8080%2Fweb\VC\TimeSpent.class
> does not contain type VC.TimeSpent as expected, but type 
> TimeSpent. Please
> remove the file, or make sure it appears in the correct 
> subdirectory of the
> class path.
> C:\jakarta-tomcat\work\localhost_8080%2Fweb\_0002fVC_0002fvc_0
> 0032_0002ejspvc2_jsp_0.java:90:
> Class VC.TimeSpent not found.
>                         TimeSpent 
> ts=(TimeSpent)session.getValue("time");
>                         ^
> C:\jakarta-tomcat\work\localhost_8080%2Fweb\_0002fVC_0002fvc_0
> 0032_0002ejspvc2_jsp_0.java:90:
> Class VC.TimeSpent not found.
>                         TimeSpent 
> ts=(TimeSpent)session.getValue("time");
>                                       ^
> Note:
> C:\jakarta-tomcat\work\localhost_8080%2Fweb\_0002fVC_0002fvc_0
> 0032_0002ejspvc2_jsp_0.java
> uses or overrides a deprecated API.  Recompile with "-deprecation" for
> details.
> 6 errors, 1 warning
> 
>         at 
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:247)
>         at 
> org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
>         at
> org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfN
> ecessary(JspServlet.java:149)
>         at
> org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
> (JspServlet.java:161)
>         at
> org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet
> .java:261)
>         at 
> org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
>         at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWra
> pper.java:503)
>         at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> nnection(HttpConnectionHandler.java:160)
>         at
> org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEnd
> point.java:338)
>         at java.lang.Thread.run(Unknown Source)
> 
> 
> 
> ____________________________________________________________________
> Get free email and a permanent address at 
> http://www.netaddress.com/?N=1
> 

Mime
View raw message