You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Sexton, George" <gs...@mhsoftware.com> on 2002/10/02 16:52:41 UTC

JSP Compilation Problem: Tomcat 4.1.12

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JSP Compilation Problem: Tomcat 4.1.12

Posted by "Sexton, George" <gs...@mhsoftware.com>.
Never mind. I found this described in Bug #10036.

-----Original Message-----
From: Sexton, George [mailto:gsexton@mhsoftware.com]
Sent: 02 October, 2002 9:03 AM
To: Tomcat Developers List
Subject: RE: JSP Compilation Problem: Tomcat 4.1.12


I'm confused by the change in behavior. I can use JDK 1.4 w/ Tomcat 4.0.4
and it works.

-----Original Message-----
From: peter lin [mailto:peter.lin@labs.gte.com]
Sent: 02 October, 2002 8:56 AM
To: Tomcat Developers List
Subject: Re: JSP Compilation Problem: Tomcat 4.1.12



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:
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JSP Compilation Problem: Tomcat 4.1.12

Posted by "Sexton, George" <gs...@mhsoftware.com>.
I'm confused by the change in behavior. I can use JDK 1.4 w/ Tomcat 4.0.4
and it works.

-----Original Message-----
From: peter lin [mailto:peter.lin@labs.gte.com]
Sent: 02 October, 2002 8:56 AM
To: Tomcat Developers List
Subject: Re: JSP Compilation Problem: Tomcat 4.1.12



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:
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JSP Compilation Problem: Tomcat 4.1.12

Posted by peter lin <pe...@labs.gte.com>.
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:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Possible bug with jspc]

Posted by peter lin <pe...@labs.gte.com>.
Here is a bit more information. I took a look at the jar files for jsp
1.1 tags and they include a taglib.tld file in meta-inf/.  Once I remove
that, it compiles the pages fine.  It looks like there's a conflict in
either jasper compiler or jspc that is unable to resolve which .tld file
to use.

peter lin wrote:
> 
> I spent the last two days trying to use JspC to compile an entire webapp
> and came across a problem. I'm not sure if this is a bug or not, but I
> can reproduce it every time.  I'm still trying to track down the cause,
> but I thought I'd post a question and maybe some one with more knowledge
> can point me in the right direction.
> 
> I am using the following command to run jspc
> 
> C:\tomcat\bin>jspc -d ..\work\Standalone\localhost\_ -uribase
> c:/myapp/web -webapp c:/myapp/web
> 
> in one of included files I define all the taglibs i use. right now I am
> using taglibs from the Jakarta. If I use the string tag, it causes JspC
> to die with NPE. If I remove the <%@ taglib %> for string tag, jspc
> works fine.  the main difference between JSTL and string tag is JSTL is
> 1.2 and string tag is 1.1.
> 
> the page works just fine if I load it in the browser, but for some
> reason, JspC doesn't like 1.1 taglibs.
> 
> can anyone provide any insight?
> 
> peter lin
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[Possible bug with jspc]

Posted by peter lin <pe...@labs.gte.com>.
I spent the last two days trying to use JspC to compile an entire webapp
and came across a problem. I'm not sure if this is a bug or not, but I
can reproduce it every time.  I'm still trying to track down the cause,
but I thought I'd post a question and maybe some one with more knowledge
can point me in the right direction.

I am using the following command to run jspc

C:\tomcat\bin>jspc -d ..\work\Standalone\localhost\_ -uribase
c:/myapp/web -webapp c:/myapp/web

in one of included files I define all the taglibs i use. right now I am
using taglibs from the Jakarta. If I use the string tag, it causes JspC
to die with NPE. If I remove the <%@ taglib %> for string tag, jspc
works fine.  the main difference between JSTL and string tag is JSTL is
1.2 and string tag is 1.1.

the page works just fine if I load it in the browser, but for some
reason, JspC doesn't like 1.1 taglibs.

can anyone provide any insight?


peter lin

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>