I have put the class in Tomcat's CLASSPATH. But I am not getting a different
type of error now (listed below). I don't get this error when calling the
class from command prompt. Is there something I am missing out?

Error
============================================================================
===========
Internal Servlet Error:
javax.servlet.ServletException:
        at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:386)
        at
_0002findex_0002ejspindex_jsp_92._jspService(_0002findex_0002ejspindex_jsp_9
2.java:358)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
        at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
Compiled Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:156)
        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
Compiled Code)
        at java.lang.Thread.run(Thread.java:479)
Root cause:
java.lang.NullPointerException:
        at
_0002findex_0002ejspindex_jsp_92._jspService(_0002findex_0002ejspindex_jsp_9
2.java:103)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
        at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
Compiled Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:156)
        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
Compiled Code)
        at java.lang.Thread.run(Thread.java:479)
============================================================================
========
End error



> -----Original Message-----
> From: Donald Vandenbeld [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, May 16, 2000 9:58 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Problem loading a Java class
>
> Make sure that the CheckUser.class file is in Tomcat's CLASSPATH.
>
> Joseph Okomba wrote:
>
> > Help please. I am new to JSP and Tomcat.
> >
> > I have written a Java class which compiles and runs properly from the
> > command prompt, but gives errors when I try to load it in a JSP file.
> This
> > is how I am loading the class:
> >
> > <%@ page session="true" %>
> > <%@ page language="java" import="java.io.*" %>
> > <jsp:useBean id="checkUser" scope="request" class="CheckUser" />
> > <%
> > boolean permit = false;
> >  String strUserid = request.getParameter("userid");
> >  String strPasswd = request.getParameter("passwd");
> >
> > if ((strUserid.equals("")) || (strPasswd.equals(""))){
> >         permit = false;
> > } else {
> >
> > permit = checkUser.authenticate(strUserid, strPasswd);
> >
> > } //end-else
> >
> > if(!permit){  // the user has permission
> > %>
> > <jsp:forward page="login.jsp?userid=<%=strUserid %>" />
> > <%
> > } //end if
> > else {
> > %>
> >
> > And the following is the error I am getting:
> >
> > Internal Servlet Error:
> > org.apache.jasper.JasperException: Unable to compile class for
> >
> JSPE:\jakarta-tomcat\work\localhost_8080%2Fmembers\_0002findex_0002ejspind
> ex
> > _jsp_92.java:74: Class CheckUser not found.
> >                 CheckUser checkUser = null;
> >                 ^
> >
> E:\jakarta-tomcat\work\localhost_8080%2Fmembers\_0002findex_0002ejspindex_
> js
> > p_92.java:77: Class CheckUser not found.
> >                     checkUser= (CheckUser)
> >                                 ^
> >
> E:\jakarta-tomcat\work\localhost_8080%2Fmembers\_0002findex_0002ejspindex_
> js
> > p_92.java:82: Class CheckUser not found.
> >                             checkUser = (CheckUser)
> > Beans.instantiate(getClassLoader(), "CheckUser");
> >                                          ^
> > 3 errors
> >
> > I will appreciate any assistance.
> >
> >
> ==========================================================================
> =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to