tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter lin <peter....@labs.gte.com>
Subject Re: JSP Compilation Problem: Tomcat 4.1.12
Date Wed, 02 Oct 2002 14:55:52 GMT

if you're using jdk 1.4, you have to have package names for your
classes. If you do not, it won't load the class correctly.

have you tried giving your classes a package name and trying it again?

peter

"Sexton, George" wrote:
> 
> I posted this several days ago on tomcat-user and haven't gotten any
> responses so I am reposting it here.
> 
> I am running into a problem with JSP pages under 4.1.12. I looked through
> the release notes, and the documentation and I can't find anything that
> seems to apply. Given a Servlet with the line:
> 
> <%@ page import="WebApp, CalServlet" %>
> 
> where WebApp and CalServlet are classes in my application WEB-INF/classes
> directory that compiles under 4.0.4, when I try to run the servlet under
> 4.1.12, it crashes on compile with the following message:
> 
> /usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/caldev/index_jsp.
> java:7: '.' expected
> import WebApp;
> 
> I turned on debugging, and the classpath looks correct:
> 
>     [javac] index_jsp.java added as
> /usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/caldev/index_jsp.
> class doesn't exist.
>     [javac] Compiling 1 source file
>     [javac] Using modern compiler
>     [javac] Compilation arguments:
>     [javac] '-classpath'
>     [javac]
> '/usr/java/lib/tools.jar:/usr/local/jakarta-tomcat-4.1.12/bin/bootstrap.jar:
> /home/gsexton/cdaily/WEB-INF/classes:/home/gsexton/cdaily/WEB-INF/lib/PNGEnc
> oder.jar:/home/gsexton/cdaily/WEB-INF/lib/activation.jar:/home/gsexton/cdail
> y/WEB-INF/lib/cryptix32.jar:/home/gsexton/cdaily/WEB-INF/lib/jdbc7.1-1.2.jar
> :/home/gsexton/cdaily/WEB-INF/lib/mail.jar:/usr/local/jakarta-tomcat-4.1.12/
> shared/classes:/usr/local/jakarta-tomcat-4.1.12/common/classes:/usr/local/ja
> karta-tomcat-4.1.12/common/endorsed/xmlParserAPIs.jar:/usr/local/jakarta-tom
> cat-4.1.12/common/endorsed/xercesImpl.jar:/usr/local/jakarta-tomcat-4.1.12/c
> ommon/lib/activation.jar:/usr/local/jakarta-tomcat-4.1.12/common/lib/jasper-
> runtime.jar:/usr/local/jakarta-tomcat-4.1.12/common/lib/jasper-compiler.jar:
> /usr/local/jakarta-tomcat-4.1.12/common/lib/naming-resources.jar:/usr/local/
> jakarta-tomcat-4.1.12/common/lib/commons-collections.jar:/usr/local/jakarta-
> tomcat-4.1.12/common/lib/naming-common.jar:/usr/local/jakarta-tomcat-4.1.12/
> common/lib/commons-logging-api.jar:/usr/local/jakarta-tomcat-4.1.12/common/l
> ib/ant.jar:/usr/local/jakarta-tomcat-4.1.12/common/lib/mail.jar:/usr/local/j
> akarta-tomcat-4.1.12/common/lib/commons-dbcp.jar:/usr/local/jakarta-tomcat-4
> .1.12/common/lib/servlet.jar:/usr/local/jakarta-tomcat-4.1.12/common/lib/jdb
> c2_0-stdext.jar:/usr/local/jakarta-tomcat-4.1.12/common/lib/commons-pool.jar
> :/usr/local/jakarta-tomcat-4.1.12/common/lib/jndi.jar:/usr/local/jakarta-tom
> cat-4.1.12/common/lib/naming-factory.jar:/usr/local/jakarta-tomcat-4.1.12/co
> mmon/lib/jta.jar:/usr/local/jakarta-tomcat-4.1.12/common/lib/MHS.jar:/usr/lo
> cal/jakarta-tomcat-4.1.12/common/lib/jdbc7.1-1.2.jar:/usr/local/jakarta-tomc
> at-4.1.12/common/lib/jconn2.jar'
>     [javac] '-sourcepath'
>     [javac]
> '/usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/caldev'
>     [javac] '-encoding'
>     [javac] 'ISO-8859-1'
>     [javac] '-g'
>     [javac]
>     [javac] The ' characters around the executable and arguments are
>     [javac] not part of the command.
>     [javac] File to be compiled:
>     [javac]
> /usr/local/jakarta-tomcat-4.1.12/work/Standalone/localhost/caldev/index_jsp.
> java
> 
> I tried this with Tomcat running as root and got the same result. I am
> using:
> 
> java version "1.4.1"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
> Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
> 
> On RedHat 7.2 w/ all patches applied.
> 
> Any ideas on this would be appreciated.
> 
> George Sexton
> MH Software, Inc.
> Home of Connect Daily Web Calendar Software
> http://www.mhsoftware.com/connectdaily.htm
> Voice: 303 438 9585
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message