Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 98867 invoked from network); 9 Nov 2001 18:56:59 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Nov 2001 18:56:59 -0000 Received: (qmail 1795 invoked by uid 97); 9 Nov 2001 18:51:05 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 1750 invoked by uid 97); 9 Nov 2001 18:51:03 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 1591 invoked from network); 9 Nov 2001 18:50:57 -0000 Content-Type: text/plain; charset="iso-8859-1" From: David Smith Organization: Cornell University To: "Tomcat Users List" Subject: Re: Newbie problem with class paths Date: Fri, 9 Nov 2001 13:56:48 -0500 X-Mailer: KMail [version 1.2] References: In-Reply-To: MIME-Version: 1.0 Message-Id: <0111091356480K.09717@NetOps.ento.cornell.edu> Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This appears to be a syntax error. You have to instantiate a variable of= =20 type TestTomCat and then use that to invoke the method isClassLoaded(). =20 Classes (last I knew) can not be used directly as was written in your cod= e. Check the error message: > Undefined variable or class name: TestTomCat > =09out.write("Has The Class Been Loaded Correctly - " + > TestTomCat.isClassLoaded()); Hope this helps in debugging.... --David Smith On Friday 09 November 2001 01:19 am, you wrote: > Hello, > > I'm having a problem that's gotta be simple to fix. > > I'm using jakarta-tomcat-4.0.1 on a Redhat Linux 7.1 server with jdk1.3= =2E1. > All the examples included with Tomcat-4.0.1 work, but I can't even get = a > simple .jsp page to run. > > > I have two files, the first being > $CATALINA_HOME/webapps/test/test_tomcat.jsp > <% > out.write("Has The Class Been Loaded Correctly - " + > TestTomCat.isClassLoaded()); > %> > > > and the 2nd being > $CATALINA_HOME/webapps/test/WEB-INF/classes/TestTomCat.java > public class TestTomCat { > > public static String isClassLoaded() { > return "YES"; > } > > } > > > When I try to access the .jsp page, I get the following error. > > org.apache.jasper.JasperException: Unable to compile class for JSP > > An error occured between lines: 1 and 3 in the jsp file: /test_tomcat.j= sp > > Generated servlet error: > /usr/jakarta-tomcat-4.0.1/work/localhost/test/test_0005ftomcat$jsp.java= :55: > Undefined variable or class name: TestTomCat > =09out.write("Has The Class Been Loaded Correctly - " + > TestTomCat.isClassLoaded()); > =09 = ^ > 1 error > > =09at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compil= ed > Code) > =09at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java, Com= piled > Code) > =09at > org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(= JspS >e rvlet.java, Compiled Code) > =09at > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServl= et.j >a va, Compiled Code) > =09at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.ja= va, > Compiled Code) > =09at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Com= piled > Code) > =09at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled= Code) > =09at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic= atio >n FilterChain.java, Compiled Code) > =09at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil= terC >h ain.java, Compiled Code) > =09at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal= ve.j >a va, Compiled Code) > =09at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j= ava, > Compiled Code) > =09at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline= =2Ejava, > Compiled Code) > =09at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, > Compiled Code) > =09at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal= ve.j >a va, Compiled Code) > =09at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j= ava, > Compiled Code) > =09at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline= =2Ejava, > Compiled Code) > =09at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, > Compiled Code) > =09at org.apache.catalina.core.StandardContext.invoke(StandardContext.j= ava, > Compiled Code) > =09at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav= a, > Compiled Code) > =09at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j= ava, > Compiled Code) > =09at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV= alve >. java, Compiled Code) > =09at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j= ava, > Compiled Code) > =09at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav= a, > Compiled Code) > =09at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j= ava, > Compiled Code) > =09at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.j= ava, > Compiled Code) > =09at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j= ava, > Compiled Code) > =09at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline= =2Ejava, > Compiled Code) > =09at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, > Compiled Code) > =09at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve= =2Ejav >a , Compiled Code) > =09at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j= ava, > Compiled Code) > =09at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline= =2Ejava, > Compiled Code) > =09at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, > Compiled Code) > =09at > org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.= java >, Compiled Code) > =09at > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java= , > Compiled Code) > =09at java.lang.Thread.run(Thread.java:484) > > > I know this has to be a simple "user error", but I haven't been able to > figure it out. > > Help please? > > > > Thanks! > Lee > > > > -- > To unsubscribe: > For additional commands: > Troubles with the list: -- To unsubscribe: For additional commands: Troubles with the list: