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" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > 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(JspServlet.java:177) > > > > at > > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java: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(ApplicationFilterChain.java:247) > > > > at > > >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > > > > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) > > > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > > > > 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.java:201) > > > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > > > > 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:566) > > > > at > > >org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) > > > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > > > > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) > > > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > > > > at > > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) > > > > at > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > > > > 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:566) > > > > 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:[EMAIL PROTECTED]> > > For additional commands: <mailto:[EMAIL PROTECTED]> > > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
