tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Egyhazy <mw...@virginia.edu>
Subject Re: URGENT HELP REQUIRED WITH JSP AND BEAN FILES ON
Date Sun, 13 Jan 2002 22:59:15 GMT
use the full package name when importing the class.  if you arent importing
the class, use the full name when instantiating an object.

matt
----- Original Message -----
From: "Chetna Bhatt" <c_bhatt@vsnl.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Sunday, January 13, 2002 1:46 PM
Subject: Re: URGENT HELP REQUIRED WITH JSP AND BEAN FILES ON


> H Amine AMAR ,
> have tried to keep in package com.mypackage
> gives the following error:
> javax.servlet.ServletException: class com.mypackage.Test :
java.lang.IllegalAccessException:
> com.mypackage.Test
>
> Could anyone throw some light on the error
>
> Thanks in advance
> regards
> chetna
>
>
> Amine AMAR wrote:
>
> > Hi,
> >
> > Are your classes in a package or not?
> > If they are not then you cannot access them because TC will look for
them in his default package
> >
> > Amine
> > ----- Original Message -----
> > From: "Chetna Bhatt" <c_bhatt@vsnl.com>
> > To: <tomcat-user@jakarta.apache.org>
> > Sent: Sunday, January 13, 2002 4:42 PM
> > Subject: URGENT HELP REQUIRED WITH JSP AND BEAN FILES ON
> >
> > > Hi,
> > > I'm using tomcat4 on windows NT platform. The classpath is set as
> > > follows:
> > > JAVA_HOME: D:\jdk1.3
> > > CATILINA_HOME: E:\jakarta-tomcat-4.0.1
> > >
> > > I'm having trouble accessing class files stored in the web-inf/classes
> > > folder.
> > > In the server.xml file, i've configured a context path to a folder
which
> > >
> > > is under webapps.
> > > <Context path="/chetna" docBase="chetna" debug="0" reloadable="true"
/>
> > >
> > > And the directory structure is:
> > > webapps/chetna/web-inf/classes/
> > > and the file name is Test.java
> > >
> > > and the Jsp resides in :
> > > webapps/chetna/Login.jsp
> > >
> > > in the Login.jsp file i'm trying to instantiating the Test bean and
> > > calling its methods.
> > >
> > > It gives me the following error::
> > >
> > > Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error
> > >
> >
> --------------------------------------------------------------------------
------
> > >
> > > type : Exception report
> > >
> > > message: Internal Server Error
> > >
> > > description: The server encountered an internal error (Internal Server
> > > Error) that prevented it from fulfilling this request.
> > >
> > > exception :
> > >
> > > org.apache.jasper.JasperException: Unable to compile class for JSP
> > >
> > > An error occurred at line: 4 in the jsp file: /checkLoginTest.jsp
> > >
> > > Generated servlet error:
> > >
E:\jakarta-tomcat-4.0.1\work\localhost\chetna\checkLoginTest$jsp.java:90:
> > >
> > > Class org.apache.jsp.Test not found.
> > >                 Test monitor1 = null;
> > >                 ^
> > >
> > >
> > > An error occurred at line: 4 in the jsp file: /checkLoginTest.jsp
> > >
> > > Generated servlet error:
> > >
E:\jakarta-tomcat-4.0.1\work\localhost\chetna\checkLoginTest$jsp.java:93:
> > >
> > > Class org.apache.jsp.Test not found.
> > >                     monitor1= (Test)
> > >                                ^
> > >
> > >
> > > An error occurred at line: 4 in the jsp file: /checkLoginTest.jsp
> > >
> > > Generated servlet error:
> > >
E:\jakarta-tomcat-4.0.1\work\localhost\chetna\checkLoginTest$jsp.java:98:
> > >
> > > Class org.apache.jsp.Test not found.
> > >                             monitor1 = (Test)
> > > java.beans.Beans.instantiate(this.getClass().getClassLoader(),
"Test");
> > >                                         ^
> > > 3 errors
> > >
> > >  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
> > >  at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
> > >  at
> > >
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:177)
> > >
> > >  at
> > >
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:189)
> > >
> > >  at
> > >
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
> > >
> > >  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >  at
> > >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> > >
> > >  at
> > >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >
> > >  at
> > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >  at
> > >
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >
> > >  at
> > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >  at
> > >
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> > >
> > >  at
> > >
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> > >
> > >  at
> > >
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> > >
> > >  at
> > >
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >
> > >  at
> > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >  at
> > >
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> > >
> > >  at
> > >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >
> > >  at
> > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >  at
> > >
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
> > >
> > >  at
> > >
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
> > >
> > >  at java.lang.Thread.run(Thread.java:484)
> > >
> > >
> > >
> >
> --------------------------------------------------------------------------
------
> > >
> > >
> > >
> > >
> > > Is there any other configuration required for accessing the  file from
> > > the classes folder. I had also tried to keep the file in
> > > web-inf/classes/com/test folder after giving the package statement:
> > > package com.test;
> > >
> > > It gave me 500 Internal Server Error and the Exception was
> > > IllegalAccessExcption
> > >
> > >
> > > Could anyone please help me with this...its really urgent.
> > >
> > > Thanks in advance.
> > >
> > >
> > > --
> > > To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > > For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> > > Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> > >
> > >
> >
> > --
> > To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> > Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message