Re: JSP Compiling - painted in a corner?

2004-05-26 Thread Illya Kysil
Jason Palmatier wrote:
Thank you for your reply.  I need the JSPs precompiled
for performance and security reasons.  Performanace
because we don't want the end user to have a bad
first impression when attempting to access our
application the first time and having to wait for each
page to compile first.
Are you sure your users have network connection fast enough to see the difference?
Security because we don't want to ship out our source jsp files, we'd rather just ship
out class files.
Hm, interesting point. Are you ready to precompile your application for each and 
every version of each and every container?

I believe the
${tomcat}/work/Catalina/localhost/${context name}
directory is where Tomcat places the class files when
it compiles them on the first access to a non-compiled
jsp.  Is this correct?  We have compiled jsps in the
past and run them by placing them in the
WEB-INF/classes directory but the current app has many
subdirectories which is where I think we're getting
hung up.  My guess is that I need to compile my jsps
to .java files in such a way as to have their
directory structure included in their package
statement.  Then do the compile from .java to .class
files.  Is having the subdirectories in the package
statement the crucial step I need to solve this?
Yes in general but it depends on application server version used. In Tomcat 4.x 
series the directory structure is not reflected in generated .java files - they 
all placed in org.apache.jsp package. Newer Tomcat (5.x) reflect directory 
structure in package names, e.g. org.apache.jsp.WEB_002dINF.jsp.survey_002dgroup 
package is used for file in WEB-INF/jsp/survey-group directory.

--
Illya Kysil, software developer
Delphi/C/C++/C#/Java/Forth/Assembler
-
No trees were harmed in the generation of this e-mail.
A significant number of electrons were, however, severely inconvenienced.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSP Compiling - painted in a corner?

2004-05-26 Thread Jason Palmatier
Hello Illya,

Thank you VERY much for your reply.  The fact that
Tomcat 5.x includes the directory structure in package
statements and 4.x does not makes everything I've been
doing much clearer.  I need to go back and start from
the beginning using Tomcat 5.x and Ant and see if I
can get it working.  If I can I'll have to do some
convincing to ship the latest version instead of the
4.x version we were planning on.  I think we'll have
to do this since we have duplicate file names in
subdirectories that are auto-generated so we have no
control over their naming.  

 Hm, interesting point. Are you ready to precompile
 your application for each and 
 every version of each and every container?

We are prepared to recompile our app for each server
we'll run on, though initially we will only support
Tomcat version x (whichever we end up going with when
it's all said and done).  We're shipping it as a
complete package (Tomcat install with our war files
included) and plan on crossing the I want to run on
my existing Tomcat bridge when we come to it.  Our
customers generally aren't running a web server of any
kind anyways so this shouldn't be much of an issue.  

Thanks again for pointing out the Tomcat version 4 vs.
5 precompile difference.  It really has cleared things
up for me.

Jason




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Compiling - painted in a corner?

2004-05-25 Thread Illya Kysil
Jason Palmatier wrote:
I'm trying to precompile JSPs and have run into some
trouble with the mappings.  First off I CANNOT use the
Ant build method as specified in
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation;
due to a lack of certain UNIX commands on the machine
I'm running on (An iSeries server running a QShell
interpreter in case you're interested).  I get
complaints about the which command and I am sure
other commands are missing as well.  So, I am
attempting to compile all the JSPs using jspc
directly.  The archives are full of references to this
but most come down to RTFM, Use this Ant script or
compile to your working directory all of which I've
either already tried, can't use, and don't want to use
in a released product.
   I've successfully created .class files, copied them
to the classes directory and integrated the generated
 ^^^ is wrong.
WEB-INF/classes is not for compiled JSP/servlet classes.
Tomcat places them in ${tomcat}/work/Catalina/localhost/${context name}.
Please, read JSP/servlet specifications from Sun's site.
BTW, why do you need those classes to be precompiled?
--
Illya Kysil, software developer
Delphi/C/C++/C#/Java/Forth/Assembler
-
No trees were harmed in the generation of this e-mail.
A significant number of electrons were, however, severely inconvenienced.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSP Compiling - painted in a corner?

2004-05-25 Thread Jason Palmatier
Hello Illya,

Thank you for your reply.  I need the JSPs precompiled
for performance and security reasons.  Performanace
because we don't want the end user to have a bad
first impression when attempting to access our
application the first time and having to wait for each
page to compile first.  Security because we don't want
to ship out or source jsp files, we'd rather just ship
out class files.

I believe the
${tomcat}/work/Catalina/localhost/${context name}
directory is where Tomcat places the class files when
it compiles them on the first access to a non-compiled
jsp.  Is this correct?  We have compiled jsps in the
past and run them by placing them in the
WEB-INF/classes directory but the current app has many
subdirectories which is where I think we're getting
hung up.  My guess is that I need to compile my jsps
to .java files in such a way as to have their
directory structure included in their package
statement.  Then do the compile from .java to .class
files.  Is having the subdirectories in the package
statement the crucial step I need to solve this?

Jason
  
--- Illya Kysil [EMAIL PROTECTED] wrote:
 Jason Palmatier wrote:
 
  I'm trying to precompile JSPs and have run into
 some
  trouble with the mappings.  First off I CANNOT use
 the
  Ant build method as specified in
 

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation;
  due to a lack of certain UNIX commands on the
 machine
  I'm running on (An iSeries server running a QShell
  interpreter in case you're interested).  I get
  complaints about the which command and I am sure
  other commands are missing as well.  So, I am
  attempting to compile all the JSPs using jspc
  directly.  The archives are full of references to
 this
  but most come down to RTFM, Use this Ant script
 or
  compile to your working directory all of which
 I've
  either already tried, can't use, and don't want to
 use
  in a released product.
 I've successfully created .class files, copied
 them
  to the classes directory and integrated the
 generated
   ^^^ is wrong.
 WEB-INF/classes is not for compiled JSP/servlet
 classes.
 Tomcat places them in
 ${tomcat}/work/Catalina/localhost/${context name}.
 
 Please, read JSP/servlet specifications from Sun's
 site.
 
 BTW, why do you need those classes to be
 precompiled?
 
 -- 
 Illya Kysil, software developer
 Delphi/C/C++/C#/Java/Forth/Assembler

-
 No trees were harmed in the generation of this
 e-mail.
 A significant number of electrons were, however,
 severely inconvenienced.
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Compiling - painted in a corner?

2004-05-25 Thread QM
On Tue, May 25, 2004 at 09:12:58AM -0700, Jason Palmatier wrote:
: Is having the subdirectories in the package
: statement the crucial step I need to solve this?

Sort of. =)

As long as you can:
1/ produce unique .class file names for each compiled
   JSP (i.e. so /x/here.jsp and /y/here.jsp)

and

2/ hold onto those names long enough to create the web.xml
   mappings

then it should work.  Using a JSP's directory path in the package name
helps with the uniqueness constraint.


The web.xml excerpt from your original message had some errors in it.  Was
that a direct copy/paste or did you hand-type it?  That's probably the
source of the problem, if the class files are correctly named/packaged and
available to Tomcat.  Please post the entire file.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Compiling - painted in a corner?

2004-05-25 Thread Filip Hanik - Dev
you couldn't use this one either?
http://cvs.apache.org/~fhanik/precompile.html.

You can very easily translate my XML file into actual Java commands, hence it 
eliminates the need for ANT. It will take a little
work.

The neat thing with my script is that it requires no mapping in web.xml since it 
compiles into the tomcat work directory, where
Jasper loads the classes from

Filip


- Original Message -
From: Jason Palmatier [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 24, 2004 12:51 PM
Subject: JSP Compiling - painted in a corner?


Hello,

I'm trying to precompile JSPs and have run into some
trouble with the mappings.  First off I CANNOT use the
Ant build method as specified in
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation;
due to a lack of certain UNIX commands on the machine
I'm running on (An iSeries server running a QShell
interpreter in case you're interested).  I get
complaints about the which command and I am sure
other commands are missing as well.  So, I am
attempting to compile all the JSPs using jspc
directly.  The archives are full of references to this
but most come down to RTFM, Use this Ant script or
compile to your working directory all of which I've
either already tried, can't use, and don't want to use
in a released product.
   I've successfully created .class files, copied them
to the classes directory and integrated the generated
xml servlet mapping fragment into my web.xml.  I
received requested resource not found when I tried
to access the first compiled page.  I did some more
research, noted that all my classes were part of the
org.apache.jsp package and created an org/apache/jsp
directory under my classes directory and copied all my
classes over to it.  I left the web.xml alone and
restarted tomcat.  I still ran into the requested
resource not found error.  I then tried modifying the
web.xml servlet definitions and mappings to see if
fully qualified class names were a problem.  None of
these attempts worked.
  So, my question is:  If my class files are part of
the org.apache.jsp package and exist in an
org/apache/jsp directory rooted in my applications
WEB-INF/classes directory shouldn't they be found if
my web.xml defines the servlet and servlet mapping as
below:

servlet

servlet-nameorg.apache.jsp.entry_jsp/servlet-name

servlet-classorg.apache.jsp.entry_jsp/servlet-class
/servlet

.
.
.

servlet-mapping

servlet-nameorg.apache.jsp.entry_jsp/servlet-name
   url-pattern/entry.jsp/url-pattern
/servlet-mapping

I have a feeling the subdirectories my jsps exist in
before they are compiled are the problem, as hinted at
in a few archive posts, but am at a loss as to what to
try next.  Is there a way to get jspc to include these
subdirectories in the package name?  Does it even
matter if they are?  Any help or pointers on this
would be greatly appreciated.

Jason




__
Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Compiling - painted in a corner?

2004-05-25 Thread Jason Palmatier
Hello QM,

Thank you very much for replying.  Unfortunately the
web.xml excerpt was a copy/paste.  The full file is
VERY large (4000 lines) so I won't post it here but
I'll give you a larger sample.  I did notice late
yesterday that there are duplicate file names among
the subdirectories so I definitely need to have the
subdirectories included in the package statement.  In
order to do this I think I need to use the Ant build
instead of calling jspc (or rather jspc.sh) directly,
correct?  I'll have to copy all the files off of the
server and onto my PC to do this but I'm not to
worried about that at this point.  If I use the Ant
method as described in the docs will it add the
subdirectories to the package statement and create the
web.xml fragment correctly by default or do I need to
do something special to enable this?  Here's a larger
sample of what the non-Ant jspc.sh compile-attempt
produced for the web.xml fragment (I did not use the
-package option, obviously):

!--
Automatically created by Tomcat JspC.
Place this fragement in the web.xml before all icon,
display-name,
description, distributable, and context-param
elements.
--

servlet
  
servlet-nameorg.apache.jsp.entry_jsp/servlet-name
  
servlet-classorg.apache.jsp.entry_jsp/servlet-class
   /servlet

servlet
  
servlet-nameorg.apache.jsp.entry_process_jsp/servlet-name
  
servlet-classorg.apache.jsp.entry_process_jsp/servlet-class
/servlet

servlet
   servlet-nameorg.apache.jsp.gso_jsp/servlet-name
  
servlet-classorg.apache.jsp.gso_jsp/servlet-class
/servlet
.
. // A BUNCH more servlet declarations here, then
eventually...
.
servlet-mapping
  
servlet-nameorg.apache.jsp.entry_jsp/servlet-name
   url-pattern/entry.jsp/url-pattern
/servlet-mapping

servlet-mapping
  
servlet-nameorg.apache.jsp.entry_process_jsp/servlet-name
   url-pattern/entry_process.jsp/url-pattern
/servlet-mapping

servlet-mapping
   servlet-nameorg.apache.jsp.gso_jsp/servlet-name
   url-pattern/gso.jsp/url-pattern
/servlet-mapping

Jason

--- QM [EMAIL PROTECTED] wrote:
 On Tue, May 25, 2004 at 09:12:58AM -0700, Jason
 Palmatier wrote:
 : Is having the subdirectories in the package
 : statement the crucial step I need to solve this?
 
 Sort of. =)
 
 As long as you can:
 1/ produce unique .class file names for each
 compiled
JSP (i.e. so /x/here.jsp and /y/here.jsp)
 
   and
 
 2/ hold onto those names long enough to create the
 web.xml
mappings
 
 then it should work.  Using a JSP's directory path
 in the package name
 helps with the uniqueness constraint.
 
 
 The web.xml excerpt from your original message had
 some errors in it.  Was
 that a direct copy/paste or did you hand-type it? 
 That's probably the
 source of the problem, if the class files are
 correctly named/packaged and
 available to Tomcat.  Please post the entire file.
 
 -QM
 
 -- 
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Compiling - painted in a corner?

2004-05-25 Thread Jason Palmatier
Hello Filip,

Thanks for the reply.  I had checked your XML file out
and thought about using it but was unsure if putting
the .class files in the work directory was an okay
thing to do for a released product.  We may have
customers installing our app into an existing Tomcat
server environment and I'm not sure how they would get
our app files into their work directory in that case. 
I'm used to the give them a war and let tomcat expand
it deployment method.  Is there a way to get tomcat
to place files in the work directory when it expands a
normal .war file?

Jason
 
--- Filip Hanik - Dev [EMAIL PROTECTED] wrote:
 you couldn't use this one either?
 http://cvs.apache.org/~fhanik/precompile.html.
 
 You can very easily translate my XML file into
 actual Java commands, hence it eliminates the need
 for ANT. It will take a little
 work.
 
 The neat thing with my script is that it requires no
 mapping in web.xml since it compiles into the tomcat
 work directory, where
 Jasper loads the classes from
 
 Filip
 
 
 - Original Message -
 From: Jason Palmatier [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 24, 2004 12:51 PM
 Subject: JSP Compiling - painted in a corner?
 
 
 Hello,
 
 I'm trying to precompile JSPs and have run into some
 trouble with the mappings.  First off I CANNOT use
 the
 Ant build method as specified in

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation;
 due to a lack of certain UNIX commands on the
 machine
 I'm running on (An iSeries server running a QShell
 interpreter in case you're interested).  I get
 complaints about the which command and I am sure
 other commands are missing as well.  So, I am
 attempting to compile all the JSPs using jspc
 directly.  The archives are full of references to
 this
 but most come down to RTFM, Use this Ant script or
 compile to your working directory all of which
 I've
 either already tried, can't use, and don't want to
 use
 in a released product.
I've successfully created .class files, copied
 them
 to the classes directory and integrated the
 generated
 xml servlet mapping fragment into my web.xml.  I
 received requested resource not found when I tried
 to access the first compiled page.  I did some more
 research, noted that all my classes were part of the
 org.apache.jsp package and created an org/apache/jsp
 directory under my classes directory and copied all
 my
 classes over to it.  I left the web.xml alone and
 restarted tomcat.  I still ran into the requested
 resource not found error.  I then tried modifying
 the
 web.xml servlet definitions and mappings to see if
 fully qualified class names were a problem.  None of
 these attempts worked.
   So, my question is:  If my class files are part of
 the org.apache.jsp package and exist in an
 org/apache/jsp directory rooted in my applications
 WEB-INF/classes directory shouldn't they be found if
 my web.xml defines the servlet and servlet mapping
 as
 below:
 
 servlet
 

servlet-nameorg.apache.jsp.entry_jsp/servlet-name
 

servlet-classorg.apache.jsp.entry_jsp/servlet-class
 /servlet
 
 .
 .
 .
 
 servlet-mapping
 

servlet-nameorg.apache.jsp.entry_jsp/servlet-name
url-pattern/entry.jsp/url-pattern
 /servlet-mapping
 
 I have a feeling the subdirectories my jsps exist in
 before they are compiled are the problem, as hinted
 at
 in a few archive posts, but am at a loss as to what
 to
 try next.  Is there a way to get jspc to include
 these
 subdirectories in the package name?  Does it even
 matter if they are?  Any help or pointers on this
 would be greatly appreciated.
 
 Jason
 
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Domains - Claim yours for only $14.70/year
 http://smallbusiness.promotions.yahoo.com/offer
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Compiling - painted in a corner?

2004-05-25 Thread QM
On Tue, May 25, 2004 at 09:51:24AM -0700, Jason Palmatier wrote:
: Unfortunately the web.xml excerpt was a copy/paste.

That's alright -- I realize, I misread it. =)


: If I use the Ant
: method as described in the docs will it add the
: subdirectories to the package statement and create the
: web.xml fragment correctly by default

Yes, in my experience.

I'd say, at this point:
1/ clear the work dir

2/ clear the compiled JSPs (org.apache.* dirs under WEB-INF/classes)

3/ precompile just a couple of JSPs, confirm the mappings-vs-filenames,
   etc.  There's a chance something's getting lost because you have 
   so many JSPs.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Compiling - painted in a corner?

2004-05-25 Thread Filip Hanik - Dev
What my stuff does is the same as jasper does when it compiles on the fly.
Except that my build does it al in one swoop. 
So what I did was to compile two features into one, 
1. precompile
2. on the fly compile

ie, all the jsp pages are precompiled, but if you change one, the jasper engine will 
compile it again.
What you are looking for is just a regular precompile, take the existing ant script 
and turn it into java commands

Filip


- Original Message - 
From: Jason Palmatier [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, May 25, 2004 12:05 PM
Subject: Re: JSP Compiling - painted in a corner?


Hello Filip,

Thanks for the reply.  I had checked your XML file out
and thought about using it but was unsure if putting
the .class files in the work directory was an okay
thing to do for a released product.  We may have
customers installing our app into an existing Tomcat
server environment and I'm not sure how they would get
our app files into their work directory in that case. 
I'm used to the give them a war and let tomcat expand
it deployment method.  Is there a way to get tomcat
to place files in the work directory when it expands a
normal .war file?

Jason
 
--- Filip Hanik - Dev [EMAIL PROTECTED] wrote:
 you couldn't use this one either?
 http://cvs.apache.org/~fhanik/precompile.html.
 
 You can very easily translate my XML file into
 actual Java commands, hence it eliminates the need
 for ANT. It will take a little
 work.
 
 The neat thing with my script is that it requires no
 mapping in web.xml since it compiles into the tomcat
 work directory, where
 Jasper loads the classes from
 
 Filip
 
 
 - Original Message -
 From: Jason Palmatier [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 24, 2004 12:51 PM
 Subject: JSP Compiling - painted in a corner?
 
 
 Hello,
 
 I'm trying to precompile JSPs and have run into some
 trouble with the mappings.  First off I CANNOT use
 the
 Ant build method as specified in

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation;
 due to a lack of certain UNIX commands on the
 machine
 I'm running on (An iSeries server running a QShell
 interpreter in case you're interested).  I get
 complaints about the which command and I am sure
 other commands are missing as well.  So, I am
 attempting to compile all the JSPs using jspc
 directly.  The archives are full of references to
 this
 but most come down to RTFM, Use this Ant script or
 compile to your working directory all of which
 I've
 either already tried, can't use, and don't want to
 use
 in a released product.
I've successfully created .class files, copied
 them
 to the classes directory and integrated the
 generated
 xml servlet mapping fragment into my web.xml.  I
 received requested resource not found when I tried
 to access the first compiled page.  I did some more
 research, noted that all my classes were part of the
 org.apache.jsp package and created an org/apache/jsp
 directory under my classes directory and copied all
 my
 classes over to it.  I left the web.xml alone and
 restarted tomcat.  I still ran into the requested
 resource not found error.  I then tried modifying
 the
 web.xml servlet definitions and mappings to see if
 fully qualified class names were a problem.  None of
 these attempts worked.
   So, my question is:  If my class files are part of
 the org.apache.jsp package and exist in an
 org/apache/jsp directory rooted in my applications
 WEB-INF/classes directory shouldn't they be found if
 my web.xml defines the servlet and servlet mapping
 as
 below:
 
 servlet
 

servlet-nameorg.apache.jsp.entry_jsp/servlet-name
 

servlet-classorg.apache.jsp.entry_jsp/servlet-class
 /servlet
 
 .
 .
 .
 
 servlet-mapping
 

servlet-nameorg.apache.jsp.entry_jsp/servlet-name
url-pattern/entry.jsp/url-pattern
 /servlet-mapping
 
 I have a feeling the subdirectories my jsps exist in
 before they are compiled are the problem, as hinted
 at
 in a few archive posts, but am at a loss as to what
 to
 try next.  Is there a way to get jspc to include
 these
 subdirectories in the package name?  Does it even
 matter if they are?  Any help or pointers on this
 would be greatly appreciated.
 
 Jason
 
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Domains - Claim yours for only $14.70/year
 http://smallbusiness.promotions.yahoo.com/offer
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com

Re: JSP Compiling - painted in a corner?

2004-05-25 Thread Jason Palmatier
Okay, I've copied my files to my PC and attempted to
run the Ant build using the build.xml given on the
Tomcat 5.0 site.  It runs for about 2 seconds and
spits out this error:

C:\apache-ant-1.6.1\bin\build.xml:21:
java.lang.VerifyError: (class: org/apache/
xerces/jaxp/DocumentBuilderImpl, method: parse
signature: (Lorg/xml/sax/InputSou
rce;)Lorg/w3c/dom/Document;) Incompatible object
argument for function call

I did some searching on google and found out that
there is some combination of jdk + xerces + Ant that
causes this to go bad but the only solution I found
was for a JUnit problem and it didn't seem to
translate.  I also searched the archives and found
similar issues but with older versions of the
respective products.  Most fixes were of the upgrade
to version x kind (which I'm already at).  This is
what I'm running with:

Ant:1.6.1
JDK:1.4.2_03
Tomcat: 4.1.18  (5.0.19 gave the saem result, see
below)

I noticed in the Ant lib directory I have two jar
files:

xercesImpl.jar and xml-apis.jar

and in the Tomcat common/endorsed directory I have 

xercesImpl.jar and xmlParserAPIs.jar 

The two xercesImpl.jar's are different sizes.  Which
of these (if either) is Ant complaining about?  So far
I've: 

1) removed both jars from the common/endorsed dir but
got the same result so I put them back.  

2) Copied the jars from the common/endorsed directory
to common/lib.  Didn't work.

3) Replaced the jar in the Ant lib directory with
those from the Tomcat common/endorsed dir. Didn't
work.

4) Attempted to do the same thing in a Tomcat 5.0.19
install directory and got the same result.  

Any ideas or pointers to information?

Jason




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JSP Compiling - painted in a corner?

2004-05-24 Thread Jason Palmatier
Hello,

I'm trying to precompile JSPs and have run into some
trouble with the mappings.  First off I CANNOT use the
Ant build method as specified in
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation;
due to a lack of certain UNIX commands on the machine
I'm running on (An iSeries server running a QShell
interpreter in case you're interested).  I get
complaints about the which command and I am sure
other commands are missing as well.  So, I am
attempting to compile all the JSPs using jspc
directly.  The archives are full of references to this
but most come down to RTFM, Use this Ant script or
compile to your working directory all of which I've
either already tried, can't use, and don't want to use
in a released product.
   I've successfully created .class files, copied them
to the classes directory and integrated the generated
xml servlet mapping fragment into my web.xml.  I
received requested resource not found when I tried
to access the first compiled page.  I did some more
research, noted that all my classes were part of the
org.apache.jsp package and created an org/apache/jsp
directory under my classes directory and copied all my
classes over to it.  I left the web.xml alone and
restarted tomcat.  I still ran into the requested
resource not found error.  I then tried modifying the
web.xml servlet definitions and mappings to see if
fully qualified class names were a problem.  None of
these attempts worked. 
  So, my question is:  If my class files are part of
the org.apache.jsp package and exist in an
org/apache/jsp directory rooted in my applications
WEB-INF/classes directory shouldn't they be found if
my web.xml defines the servlet and servlet mapping as
below:

servlet
  
servlet-nameorg.apache.jsp.entry_jsp/servlet-name
  
servlet-classorg.apache.jsp.entry_jsp/servlet-class
/servlet

.
.
.

servlet-mapping
  
servlet-nameorg.apache.jsp.entry_jsp/servlet-name
   url-pattern/entry.jsp/url-pattern
/servlet-mapping

I have a feeling the subdirectories my jsps exist in
before they are compiled are the problem, as hinted at
in a few archive posts, but am at a loss as to what to
try next.  Is there a way to get jspc to include these
subdirectories in the package name?  Does it even
matter if they are?  Any help or pointers on this
would be greatly appreciated.

Jason




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]