Re: More helpful reporting of exceptions in JSPs

2005-10-12 Thread Darryl L. Miles

Tim Fennell wrote:


I've posted my patch for Jasper/Tomcat at the following location:
http://www.tfenne.com/jasper/

The page has a brief overview, a download link and  "before and  
after" screenshots so you can get an idea for what exactly the patch  
does before you decide to patch your own environment.  If you give it  
a shot and have any problems and/or suggestions for improving it  
please let me know - but please read the readme first ;)



Excellent addition.  Maybe once you have got an initial around of 
feedback for users of the latest 5.0.x and 5.5.x you might like to post 
it up on Tomcat Bugzilla 
http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205 and 
attach the patch.


Darryl


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



Re: More helpful reporting of exceptions in JSPs

2005-10-11 Thread Tim Fennell

Hi All,

I've posted my patch for Jasper/Tomcat at the following location:
http://www.tfenne.com/jasper/

The page has a brief overview, a download link and  "before and  
after" screenshots so you can get an idea for what exactly the patch  
does before you decide to patch your own environment.  If you give it  
a shot and have any problems and/or suggestions for improving it  
please let me know - but please read the readme first ;)


Happy bug hunting.

-Tim Fennell
http://stripes.mc4j.org

On Oct 11, 2005, at 3:40 PM, Tim Fennell wrote:

I certainly don't have a problem with that.  Obviously I'd rather  
have it in the main codebase - while I don't have a problem running  
a patched version of jasper, I'm sure that would freak out a good  
number of PHBs ;)  But since there is interest I'll clean up what I  
have, put it online and post a link here.  That should happen some  
time this evening.


-t

On Oct 11, 2005, at 2:01 PM, GB Developer wrote:


regardless how the commiters feel about it, are you willing to  
release your

patched source files? (So for example, I can compile and deploy them
myself?)   ;)  If so, I'd say a page on your wiki might be alright  
for

distro, with a link to the page sent to tomcat-user  ?

I'd be giving it a try about 10 minutes after you send out your  
email, since
I've often wondered about this feature. Usually right after  
digging through

the work directory for a generated java file.





-Original Message-
From: Tim Fennell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 11, 2005 12:15 PM
To: Tomcat Users List
Subject: Fwd: More helpful reporting of exceptions in JSPs


Apologies in advance for cross-posting this, but I sent this email
out to the tomcat-dev list a couple of days ago and have received no
replies at all...  I think this is quite  a useful feature, and I'm
wondering how best to go about contributing it.
Thanks

-Tim Fennell
http://stripes.mc4j.org

Begin forwarded message:




From: Tim Fennell <[EMAIL PROTECTED]>
Date: October 9, 2005 5:50:11 PM EDT
To: tomcat-dev@jakarta.apache.org
Subject: More helpful reporting of exceptions in JSPs
Reply-To: "Tomcat Developers List" 







At any rate, I have code that will do this now, and I think it'd be
a great productivity boost for anyone else developing JSPs on
Tomcat.  It amounts to small patches to two files.  The first is
org.apache.jasper.compiler.Compiler to make it hang on to



the parse



tree (pageNodes) if in development mode, and a getter to make this
accessible.  The second is to
org.apache.jasper.servlet.JspServletWrapper to do the grunt



work of



mapping a stack frame from the exception back to the line in the
JSP that it came from.





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





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



Re: More helpful reporting of exceptions in JSPs

2005-10-11 Thread Tim Fennell
I certainly don't have a problem with that.  Obviously I'd rather  
have it in the main codebase - while I don't have a problem running a  
patched version of jasper, I'm sure that would freak out a good  
number of PHBs ;)  But since there is interest I'll clean up what I  
have, put it online and post a link here.  That should happen some  
time this evening.


-t

On Oct 11, 2005, at 2:01 PM, GB Developer wrote:

regardless how the commiters feel about it, are you willing to  
release your

patched source files? (So for example, I can compile and deploy them
myself?)   ;)  If so, I'd say a page on your wiki might be alright for
distro, with a link to the page sent to tomcat-user  ?

I'd be giving it a try about 10 minutes after you send out your  
email, since
I've often wondered about this feature. Usually right after digging  
through

the work directory for a generated java file.




-Original Message-
From: Tim Fennell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 11, 2005 12:15 PM
To: Tomcat Users List
Subject: Fwd: More helpful reporting of exceptions in JSPs


Apologies in advance for cross-posting this, but I sent this email
out to the tomcat-dev list a couple of days ago and have received no
replies at all...  I think this is quite  a useful feature, and I'm
wondering how best to go about contributing it.
Thanks

-Tim Fennell
http://stripes.mc4j.org

Begin forwarded message:



From: Tim Fennell <[EMAIL PROTECTED]>
Date: October 9, 2005 5:50:11 PM EDT
To: tomcat-dev@jakarta.apache.org
Subject: More helpful reporting of exceptions in JSPs
Reply-To: "Tomcat Developers List" 





At any rate, I have code that will do this now, and I think it'd be
a great productivity boost for anyone else developing JSPs on
Tomcat.  It amounts to small patches to two files.  The first is
org.apache.jasper.compiler.Compiler to make it hang on to


the parse


tree (pageNodes) if in development mode, and a getter to make this
accessible.  The second is to
org.apache.jasper.servlet.JspServletWrapper to do the grunt


work of


mapping a stack frame from the exception back to the line in the
JSP that it came from.




-
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: More helpful reporting of exceptions in JSPs

2005-10-11 Thread Leon Rosenberg
could you post your patch for download anywhere? If you need webspace,
I can provide you some. I would find the patch extremely helpful, and
would love to have it in my development tomcat, as soon as possible.

thanx
leon

On 10/11/05, Tim Fennell <[EMAIL PROTECTED]> wrote:
> Apologies in advance for cross-posting this, but I sent this email
> out to the tomcat-dev list a couple of days ago and have received no
> replies at all...  I think this is quite  a useful feature, and I'm
> wondering how best to go about contributing it.
> Thanks
>
> -Tim Fennell
> http://stripes.mc4j.org
>
> Begin forwarded message:
>
> > From: Tim Fennell <[EMAIL PROTECTED]>
> > Date: October 9, 2005 5:50:11 PM EDT
> > To: tomcat-dev@jakarta.apache.org
> > Subject: More helpful reporting of exceptions in JSPs
> > Reply-To: "Tomcat Developers List" 
> >
> >
> > Hi,
> >
> > I'll apologize in advance if this is the wrong place to post this,
> > or if this has been covered before.  I had a good read through the
> > Tomcat docs and faqs, searched the bug database, and googled around
> > on the topic, but could not really find anything.
> >
> > I've been using Tomcat for a while, and in general have found it as
> > good a servlet/JSP container as any I've used.  With one exception
> > (no pun intended).  A long time ago I started out using WebLogic,
> > and the one thing that I loved about WebLogic, that is missing from
> > Tomcat, is that when an Exception occurred in a JSP it would tell
> > you what line number *in the JSP* generated the exception, and show
> > you a snippet of code around the offending line.
> >
> > For quite a while I'd figured that the way Tomcat was built
> > prevented this from being easy/possible, but I didn't look.  Well,
> > I finally got around to looking, and it only took me a couple of
> > hours to implement it.  Which makes me wonder if there is some
> > other reason that this isn't done in Tomcat/Jasper?
> >
> > At any rate, I have code that will do this now, and I think it'd be
> > a great productivity boost for anyone else developing JSPs on
> > Tomcat.  It amounts to small patches to two files.  The first is
> > org.apache.jasper.compiler.Compiler to make it hang on to the parse
> > tree (pageNodes) if in development mode, and a getter to make this
> > accessible.  The second is to
> > org.apache.jasper.servlet.JspServletWrapper to do the grunt work of
> > mapping a stack frame from the exception back to the line in the
> > JSP that it came from.
> >
> > It's all coded up to function only when in development mode, and is
> > reasonably well commented.  Would any of the committers be
> > interested in taking a look at this if I put together a patch and
> > posted it here?  Cheers,
> >
> > -Tim Fennell
> > http://stripes.mc4j.org
> >
> > -
> > 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: More helpful reporting of exceptions in JSPs

2005-10-11 Thread GB Developer
regardless how the commiters feel about it, are you willing to release your
patched source files? (So for example, I can compile and deploy them
myself?)   ;)  If so, I'd say a page on your wiki might be alright for
distro, with a link to the page sent to tomcat-user  ?
 
I'd be giving it a try about 10 minutes after you send out your email, since
I've often wondered about this feature. Usually right after digging through
the work directory for a generated java file. 


> -Original Message-
> From: Tim Fennell [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 11, 2005 12:15 PM
> To: Tomcat Users List
> Subject: Fwd: More helpful reporting of exceptions in JSPs
> 
> 
> Apologies in advance for cross-posting this, but I sent this email  
> out to the tomcat-dev list a couple of days ago and have received no  
> replies at all...  I think this is quite  a useful feature, and I'm  
> wondering how best to go about contributing it.
> Thanks
> 
> -Tim Fennell
> http://stripes.mc4j.org
> 
> Begin forwarded message:
> 
> > From: Tim Fennell <[EMAIL PROTECTED]>
> > Date: October 9, 2005 5:50:11 PM EDT
> > To: tomcat-dev@jakarta.apache.org
> > Subject: More helpful reporting of exceptions in JSPs
> > Reply-To: "Tomcat Developers List" 

> > At any rate, I have code that will do this now, and I think it'd be
> > a great productivity boost for anyone else developing JSPs on  
> > Tomcat.  It amounts to small patches to two files.  The first is  
> > org.apache.jasper.compiler.Compiler to make it hang on to 
> the parse  
> > tree (pageNodes) if in development mode, and a getter to make this  
> > accessible.  The second is to  
> > org.apache.jasper.servlet.JspServletWrapper to do the grunt 
> work of  
> > mapping a stack frame from the exception back to the line in the  
> > JSP that it came from.


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



Re: Fwd: More helpful reporting of exceptions in JSPs

2005-10-11 Thread Frank W. Zammetti
Wow, you are my hero!  I've always missed that from the Weblogic days!  I
for one would love to see this added.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Tue, October 11, 2005 1:15 pm, Tim Fennell said:
> Apologies in advance for cross-posting this, but I sent this email
> out to the tomcat-dev list a couple of days ago and have received no
> replies at all...  I think this is quite  a useful feature, and I'm
> wondering how best to go about contributing it.
> Thanks
>
> -Tim Fennell
> http://stripes.mc4j.org
>
> Begin forwarded message:
>
>> From: Tim Fennell <[EMAIL PROTECTED]>
>> Date: October 9, 2005 5:50:11 PM EDT
>> To: tomcat-dev@jakarta.apache.org
>> Subject: More helpful reporting of exceptions in JSPs
>> Reply-To: "Tomcat Developers List" 
>>
>>
>> Hi,
>>
>> I'll apologize in advance if this is the wrong place to post this,
>> or if this has been covered before.  I had a good read through the
>> Tomcat docs and faqs, searched the bug database, and googled around
>> on the topic, but could not really find anything.
>>
>> I've been using Tomcat for a while, and in general have found it as
>> good a servlet/JSP container as any I've used.  With one exception
>> (no pun intended).  A long time ago I started out using WebLogic,
>> and the one thing that I loved about WebLogic, that is missing from
>> Tomcat, is that when an Exception occurred in a JSP it would tell
>> you what line number *in the JSP* generated the exception, and show
>> you a snippet of code around the offending line.
>>
>> For quite a while I'd figured that the way Tomcat was built
>> prevented this from being easy/possible, but I didn't look.  Well,
>> I finally got around to looking, and it only took me a couple of
>> hours to implement it.  Which makes me wonder if there is some
>> other reason that this isn't done in Tomcat/Jasper?
>>
>> At any rate, I have code that will do this now, and I think it'd be
>> a great productivity boost for anyone else developing JSPs on
>> Tomcat.  It amounts to small patches to two files.  The first is
>> org.apache.jasper.compiler.Compiler to make it hang on to the parse
>> tree (pageNodes) if in development mode, and a getter to make this
>> accessible.  The second is to
>> org.apache.jasper.servlet.JspServletWrapper to do the grunt work of
>> mapping a stack frame from the exception back to the line in the
>> JSP that it came from.
>>
>> It's all coded up to function only when in development mode, and is
>> reasonably well commented.  Would any of the committers be
>> interested in taking a look at this if I put together a patch and
>> posted it here?  Cheers,
>>
>> -Tim Fennell
>> http://stripes.mc4j.org
>>
>> -
>> 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]



Fwd: More helpful reporting of exceptions in JSPs

2005-10-11 Thread Tim Fennell
Apologies in advance for cross-posting this, but I sent this email  
out to the tomcat-dev list a couple of days ago and have received no  
replies at all...  I think this is quite  a useful feature, and I'm  
wondering how best to go about contributing it.

Thanks

-Tim Fennell
http://stripes.mc4j.org

Begin forwarded message:


From: Tim Fennell <[EMAIL PROTECTED]>
Date: October 9, 2005 5:50:11 PM EDT
To: tomcat-dev@jakarta.apache.org
Subject: More helpful reporting of exceptions in JSPs
Reply-To: "Tomcat Developers List" 


Hi,

I'll apologize in advance if this is the wrong place to post this,  
or if this has been covered before.  I had a good read through the  
Tomcat docs and faqs, searched the bug database, and googled around  
on the topic, but could not really find anything.


I've been using Tomcat for a while, and in general have found it as  
good a servlet/JSP container as any I've used.  With one exception  
(no pun intended).  A long time ago I started out using WebLogic,  
and the one thing that I loved about WebLogic, that is missing from  
Tomcat, is that when an Exception occurred in a JSP it would tell  
you what line number *in the JSP* generated the exception, and show  
you a snippet of code around the offending line.


For quite a while I'd figured that the way Tomcat was built  
prevented this from being easy/possible, but I didn't look.  Well,  
I finally got around to looking, and it only took me a couple of  
hours to implement it.  Which makes me wonder if there is some  
other reason that this isn't done in Tomcat/Jasper?


At any rate, I have code that will do this now, and I think it'd be  
a great productivity boost for anyone else developing JSPs on  
Tomcat.  It amounts to small patches to two files.  The first is  
org.apache.jasper.compiler.Compiler to make it hang on to the parse  
tree (pageNodes) if in development mode, and a getter to make this  
accessible.  The second is to  
org.apache.jasper.servlet.JspServletWrapper to do the grunt work of  
mapping a stack frame from the exception back to the line in the  
JSP that it came from.


It's all coded up to function only when in development mode, and is  
reasonably well commented.  Would any of the committers be  
interested in taking a look at this if I put together a patch and  
posted it here?  Cheers,


-Tim Fennell
http://stripes.mc4j.org

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






Re: precompiling JSPs -- how to resolve references normally resolved by apache?

2005-10-06 Thread ut9h-3pye
Jon,

Thanks for your help.  The uribase and uriroot were not set correctly.
Here is the final version that I got working. I had one additional twist
that
I needed to copy the JSP files to another location first using the ant

task. 
I set uriroot to the webapps root {dir}/html, and then jasper2
automatically
found the JSP files in the subdirectories under jsp/** and correctly
resolved
the references "/jsp/**.jsp" inside the JSP files.

Once it works, it's great. But it several hours of frustration because
tomcat4.x jasper often just print NullPointerExceptions instead of an
error message. So you have to guess what is wrong.

-Alex













































On Thu, 06 Oct 2005 14:06:23 +0100, "Jon Wingfield"
<[EMAIL PROTECTED]> said:
>
> 
> Unless you have a directory ${TOP}/web/html/jsp/jsp your uribase/uriroot 
> probably aren't right.
> 
> [EMAIL PROTECTED] wrote:
> > Hi,
> > 
> > I am trying to get our JSPs to be precompiled as part of
> > our ant build process to catch all syntax errors at compile
> > time.
> > 
> > The problem I have run into is that we are using apache +
> > tomcat and we have set the following rules in apache httpd.
> > conf:
> > 
> >JkMount /servlets/* ajp13
> >JkMount /jsp/* ajp13
> >JkMount /controller/* cont
> >JkMount /cgi-bin/java-rmi.cgi ajp13
> > 
> > Inside some of our servlets and JSPs, they refer to other
> > jsps using the absolute URL "/jsp/" which works in deployed
> > environment because apache redirects it.  For example, in
> > one JSP we have  <%@ include file="/jsp/Header.jsp" %>
> > 
> > I setup the tomcat-4.1.30 ant jspc task and it was giving a
> > NPE. Then I tried the Ant Jspc optional task, and it gave
> > me an error message:
> > 
> > the file '\Status.jsp' generated the following general
> > exceptionn: org.apache.jasper.JasperExeption: 
> > /Status.jsp(3,0) File "/jsp/Header.jsp" not found
> > 
> > Is there any quick and dirty way to get the JspC to resolve
> > the "/jsp/*.jsp" urls to "*.jsp" or is there no way?
> > 
> > My alternative is to try to change all the "/jsp/*.jsp"
> > references to "*.jsp" everywhere we do an <%@ include %> or
> >  or . I think  that would be ok
> > since those directices are handled on the tomcat side. Changing
> > it would be kind of messy since we have a ton of JSPs in a 
> > large directory hierarchy, so some of those "/jsp/Header.jsp"
> > references would have to be changed to "../../Header.jsp", etc.
> > I know I can't get away from the "/jsp" mapping completely
> > because we have URLs and HTTP redirects which depend on it.
> > 
> > Here is the quick and dirty jspc ant target I created:
> >   >  srcdir="${TOP}/web/html/jsp"
> >  uribase="${TOP}/web/html/jsp"
> >  uriroot="${TOP}/web/html/jsp"
> >  destdir="${TMP_DIR}/WEB-INF/src"
> >  compiler="jasper41"
> >  verbose="9">
> >  
> >  
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Thanks for any advice,
> > -Alex
> > 
> > -
> > 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]
> 

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



Re: precompiling JSPs -- how to resolve references normally resolved by apache?

2005-10-06 Thread Jon Wingfield
Unless you have a directory ${TOP}/web/html/jsp/jsp your uribase/uriroot 
probably aren't right.


[EMAIL PROTECTED] wrote:

Hi,

I am trying to get our JSPs to be precompiled as part of
our ant build process to catch all syntax errors at compile
time.

The problem I have run into is that we are using apache +
tomcat and we have set the following rules in apache httpd.
conf:

   JkMount /servlets/* ajp13
   JkMount /jsp/* ajp13
   JkMount /controller/* cont
   JkMount /cgi-bin/java-rmi.cgi ajp13

Inside some of our servlets and JSPs, they refer to other
jsps using the absolute URL "/jsp/" which works in deployed
environment because apache redirects it.  For example, in
one JSP we have  <%@ include file="/jsp/Header.jsp" %>

I setup the tomcat-4.1.30 ant jspc task and it was giving a
NPE. Then I tried the Ant Jspc optional task, and it gave
me an error message:

the file '\Status.jsp' generated the following general
exceptionn: org.apache.jasper.JasperExeption: 
/Status.jsp(3,0) File "/jsp/Header.jsp" not found


Is there any quick and dirty way to get the JspC to resolve
the "/jsp/*.jsp" urls to "*.jsp" or is there no way?

My alternative is to try to change all the "/jsp/*.jsp"
references to "*.jsp" everywhere we do an <%@ include %> or
 or . I think  that would be ok
since those directices are handled on the tomcat side. Changing
it would be kind of messy since we have a ton of JSPs in a 
large directory hierarchy, so some of those "/jsp/Header.jsp"

references would have to be changed to "../../Header.jsp", etc.
I know I can't get away from the "/jsp" mapping completely
because we have URLs and HTTP redirects which depend on it.

Here is the quick and dirty jspc ant target I created:
 
 
 
   





















Thanks for any advice,
-Alex

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



precompiling JSPs -- how to resolve references normally resolved by apache?

2005-10-05 Thread ut9h-3pye
Hi,

I am trying to get our JSPs to be precompiled as part of
our ant build process to catch all syntax errors at compile
time.

The problem I have run into is that we are using apache +
tomcat and we have set the following rules in apache httpd.
conf:

   JkMount /servlets/* ajp13
   JkMount /jsp/* ajp13
   JkMount /controller/* cont
   JkMount /cgi-bin/java-rmi.cgi ajp13

Inside some of our servlets and JSPs, they refer to other
jsps using the absolute URL "/jsp/" which works in deployed
environment because apache redirects it.  For example, in
one JSP we have  <%@ include file="/jsp/Header.jsp" %>

I setup the tomcat-4.1.30 ant jspc task and it was giving a
NPE. Then I tried the Ant Jspc optional task, and it gave
me an error message:

the file '\Status.jsp' generated the following general
exceptionn: org.apache.jasper.JasperExeption: 
/Status.jsp(3,0) File "/jsp/Header.jsp" not found

Is there any quick and dirty way to get the JspC to resolve
the "/jsp/*.jsp" urls to "*.jsp" or is there no way?

My alternative is to try to change all the "/jsp/*.jsp"
references to "*.jsp" everywhere we do an <%@ include %> or
 or . I think  that would be ok
since those directices are handled on the tomcat side. Changing
it would be kind of messy since we have a ton of JSPs in a 
large directory hierarchy, so some of those "/jsp/Header.jsp"
references would have to be changed to "../../Header.jsp", etc.
I know I can't get away from the "/jsp" mapping completely
because we have URLs and HTTP redirects which depend on it.

Here is the quick and dirty jspc ant target I created:
 
 
 
   





















Thanks for any advice,
-Alex

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



Re: How to PreCompile JSPs

2005-10-04 Thread Frank Langanke

Murali schrieb:


Hi ,
Can you someone provide me some information on how to precompile JSPs
(probably thousands of JSPs) ?
 Regards,
Murali

 


http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html

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



RE: Precompile jsps into work directory

2005-09-30 Thread Scott Goldstein
Never mind.  I searched the list again and found the answer.  Though I
haven't tried it, yet, it looks like with the proper arguments (output
directory, package name, etc.) to JSPC, you can manipulate it to compile
the jsps to the work directory and not have to insert the servlet
definition fragments in web.xml.

 

This seems like a task which should be automated through an option in
the JSPC task.  Why?  Suppose that I have a WAR file which I would like
to deploy on multiple application servers.  Each app server may have its
own jsp compiler.  I don't see why I should have to build separate WAR
files in order to precompile jsps for each application server.  Ideally,
I could build one WAR file and then precompile for each application
server.  

 

Scott

 



From: Scott Goldstein 
Sent: Thursday, September 29, 2005 8:47 PM
To: 'tomcat-user@jakarta.apache.org'
Subject: Precompile jsps into work directory

 

I've searched the archives and couldn't find an answer to this question.
The Tomcat manual suggests using Jspc to precompile jsps.  The method it
describes precompiles the jsps and creates stub servlet definitions for
each jsp to place within web.xml.  Instead of this method, I would like
to simply precompile the jsps into the tomcat work directory.  I know I
can do this by requesting each jsp with the precompile request
parameter, but I'd like a command line/Ant method of doing this without
having to run the server.  

 

Has anyone tried/been successful in doing this?

 

Thanks.

 

Scott



Precompile jsps into work directory

2005-09-29 Thread Scott Goldstein
I've searched the archives and couldn't find an answer to this question.
The Tomcat manual suggests using Jspc to precompile jsps.  The method it
describes precompiles the jsps and creates stub servlet definitions for
each jsp to place within web.xml.  Instead of this method, I would like
to simply precompile the jsps into the tomcat work directory.  I know I
can do this by requesting each jsp with the precompile request
parameter, but I'd like a command line/Ant method of doing this without
having to run the server.  

 

Has anyone tried/been successful in doing this?

 

Thanks.

 

Scott



AW: How to PreCompile JSPs

2005-09-29 Thread Bernhard Slominski
>From the Tomcat docs:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html


> -Ursprüngliche Nachricht-
> Von: Murali [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 29. September 2005 16:54
> An: tomcat-user@jakarta.apache.org
> Betreff: How to PreCompile JSPs
> 
> 
> Hi ,
>  Can you someone provide me some information on how to precompile JSPs
> (probably thousands of JSPs) ?
>   Regards,
> Murali
> 

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



Re: How to PreCompile JSPs

2005-09-29 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Murali wrote:
> Hi ,
>  Can you someone provide me some information on how to precompile JSPs
> (probably thousands of JSPs) ?

This might help.
http://www.rgagnon.com/javadetails/java-0414.html


- --
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDPAIUikQgpVn8xrARAjqMAJ9zT3FPwhgnXPGyG9XvrAmlptzzBQCeNfz5
9s+G7lFVcWAObuJZ5L0YYSw=
=AoqJ
-END PGP SIGNATURE-

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



How to PreCompile JSPs

2005-09-29 Thread Murali
Hi ,
 Can you someone provide me some information on how to precompile JSPs
(probably thousands of JSPs) ?
  Regards,
Murali


Re: Jsps

2005-09-28 Thread Leon Rosenberg
if you haven't reconfigured your resin -> actually nothing.
just drop your war file in webapps.

if you did, you have to do the same you did in httpd.sh now in
catalina.sh. More or less.

leon


On 9/29/05, Prema Kumar <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have an Application which is J2EE Architecture and working with Resin
> 2.1.6
>
> Now we are trying to bring up my application using Tomcat.
>
> What necessary modifications needs to be done in Tomcat web.xml file and
> server.xml
>
> Prem
>
>
>
> 
>
> The information in this mail is confidential and is intended solely for the
> addressee. Access to this mail by anyone else is unauthorized. Any copying
> or further distribution beyond the original recipient is not intended and
> may be unlawful. The opinion expressed in this mail is that of the sender
> and does not necessarily reflect that of Titan.
>
> 
>

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



Jsps

2005-09-28 Thread Prema Kumar

Hi,

I have an Application which is J2EE Architecture and working with Resin
2.1.6

Now we are trying to bring up my application using Tomcat. 

What necessary modifications needs to be done in Tomcat web.xml file and
server.xml

Prem 





The information in this mail is confidential and is intended solely for the 
addressee. Access to this mail by anyone else is unauthorized. Any copying 
or further distribution beyond the original recipient is not intended and 
may be unlawful. The opinion expressed in this mail is that of the sender 
and does not necessarily reflect that of Titan.



RE: Pre-compiled JSPs? - Solved. Thanks!

2005-09-07 Thread Richard Burman
Right, I get it now. Thanks for all your help Tim, Darryl and Nicolas!

Happy Tomcat-ing,
Richard.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: 07 September 2005 12:15
To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?

Yes, think of jspf like .h files in c. You don't compile .h files, but
.c 
files include .h files at compile time.

-Tim

Richard Burman wrote:

> Hi Tim,
> 
> Sorry, I'm sure I'm being a bit dense but I seem to be missing
something
> important here.
> 
> Are the jspf files included (embedded) into the class file when Jasper
> compiles the jsp files to java? Essentially, the compiled class file
> will include the original jsp and also the fragment?
>  

-
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: Pre-compiled JSPs?

2005-09-07 Thread Tim Funk
Yes, think of jspf like .h files in c. You don't compile .h files, but .c 
files include .h files at compile time.


-Tim

Richard Burman wrote:


Hi Tim,

Sorry, I'm sure I'm being a bit dense but I seem to be missing something
important here.

Are the jspf files included (embedded) into the class file when Jasper
compiles the jsp files to java? Essentially, the compiled class file
will include the original jsp and also the fragment?
 


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



RE: Pre-compiled JSPs?

2005-09-07 Thread Richard Burman
Hi Tim,

Sorry, I'm sure I'm being a bit dense but I seem to be missing something
important here.

Are the jspf files included (embedded) into the class file when Jasper
compiles the jsp files to java? Essentially, the compiled class file
will include the original jsp and also the fragment?

Thanks for your help!

Richard.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 17:01
To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?

There is no need to turn jspf into classes. The jspf are included by
real jsp 
files. Those jsp files are turned into the class files.

-Tim

Richard Burman wrote:

> Tim,
> 
> Is there no way of turning the fragment (jspf) file into .class files
or
> do they need to remain as JSPs?
> 
> Cheers,
> Richard.
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED] 
> Sent: 06 September 2005 16:14
> To: Tomcat Users List
> Subject: Re: Pre-compiled JSPs?
> 
>  From the jasper task all the [valid] jsp's are turned into java files
> and 
> compiled into class files. Those class files need to be a jar file in 
> WEB-INF/lib or inside WEB-INF/classes. The jasper task can also
rewrite 
> web.xml so that all the mappings from the JSP --> class file are taken
> care of.
> 
> Once all the jsp's are compiled and mapped in web.xml. They can be
> deleted 
> from the deployment war file (or dir).
> 
> 
> -Tim
> 
> Richard Burman wrote:
> 
> 
>>Hi Tim,
>>
>>Yeah, that's my exact issue, except the pages somewhat more
> 
> complicated
> 
>>than your example. ;o)
>>
>>I've tried renaming one of them to jspf and, unsurprisingly, it has
> 
> been
> 
>>ignored by the JSP compiler. I'll have to take your word that it would
>>still work in the parent (once the reference had been changed to point
>>to jspf, not jsp) as I don't have a test bed up and running at the
>>moment.
>>
>>Okay, so we've ascertained how to avoid the 'fragments' being compiled
>>because they're effectively not valid JSP pages because they use beans
>>that are never declared within themselves. The 'parent' page will
>>compile because it has all it needs to be compiled but the fragment
>>cannot be compiled without the presence of the parent. Does this mean
>>that I can only include the 'parent' JSPs in my JAR file and included
> 
> in
> 
>>my web.xml? Do I have to keep the fragments as raw JSPs in my webapp,
>>then? I'd really rather get them all together in a JAR, if possible,
>>which is why I'm on this voyage of discovery! :o)
>>

-
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: Pre-compiled JSPs?

2005-09-06 Thread Tim Funk
There is no need to turn jspf into classes. The jspf are included by real jsp 
files. Those jsp files are turned into the class files.


-Tim

Richard Burman wrote:


Tim,

Is there no way of turning the fragment (jspf) file into .class files or
do they need to remain as JSPs?

Cheers,
Richard.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 16:14

To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?

 From the jasper task all the [valid] jsp's are turned into java files
and 
compiled into class files. Those class files need to be a jar file in 
WEB-INF/lib or inside WEB-INF/classes. The jasper task can also rewrite 
web.xml so that all the mappings from the JSP --> class file are taken

care of.

Once all the jsp's are compiled and mapped in web.xml. They can be
deleted 
from the deployment war file (or dir).



-Tim

Richard Burman wrote:



Hi Tim,

Yeah, that's my exact issue, except the pages somewhat more


complicated


than your example. ;o)

I've tried renaming one of them to jspf and, unsurprisingly, it has


been


ignored by the JSP compiler. I'll have to take your word that it would
still work in the parent (once the reference had been changed to point
to jspf, not jsp) as I don't have a test bed up and running at the
moment.

Okay, so we've ascertained how to avoid the 'fragments' being compiled
because they're effectively not valid JSP pages because they use beans
that are never declared within themselves. The 'parent' page will
compile because it has all it needs to be compiled but the fragment
cannot be compiled without the presence of the parent. Does this mean
that I can only include the 'parent' JSPs in my JAR file and included


in


my web.xml? Do I have to keep the fragments as raw JSPs in my webapp,
then? I'd really rather get them all together in a JAR, if possible,
which is why I'm on this voyage of discovery! :o)



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



RE: Pre-compiled JSPs?

2005-09-06 Thread Richard Burman
Tim,

Is there no way of turning the fragment (jspf) file into .class files or
do they need to remain as JSPs?

Cheers,
Richard.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 16:14
To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?

 From the jasper task all the [valid] jsp's are turned into java files
and 
compiled into class files. Those class files need to be a jar file in 
WEB-INF/lib or inside WEB-INF/classes. The jasper task can also rewrite 
web.xml so that all the mappings from the JSP --> class file are taken
care of.

Once all the jsp's are compiled and mapped in web.xml. They can be
deleted 
from the deployment war file (or dir).


-Tim

Richard Burman wrote:

> Hi Tim,
> 
> Yeah, that's my exact issue, except the pages somewhat more
complicated
> than your example. ;o)
> 
> I've tried renaming one of them to jspf and, unsurprisingly, it has
been
> ignored by the JSP compiler. I'll have to take your word that it would
> still work in the parent (once the reference had been changed to point
> to jspf, not jsp) as I don't have a test bed up and running at the
> moment.
> 
> Okay, so we've ascertained how to avoid the 'fragments' being compiled
> because they're effectively not valid JSP pages because they use beans
> that are never declared within themselves. The 'parent' page will
> compile because it has all it needs to be compiled but the fragment
> cannot be compiled without the presence of the parent. Does this mean
> that I can only include the 'parent' JSPs in my JAR file and included
in
> my web.xml? Do I have to keep the fragments as raw JSPs in my webapp,
> then? I'd really rather get them all together in a JAR, if possible,
> which is why I'm on this voyage of discovery! :o)
> 

-
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: compile precompile jsps at runtime

2005-09-06 Thread Peter Crowther
> From: Zachi Hazan [mailto:[EMAIL PROTECTED] 
> Subject: Re: compile precompile jsps at runtime
> 
> So, how can I do it with tomcat not "out of the box"?

One approach would be to cheat!  Tomcat compiles the page when the page
is first invoked.  So, you could for example define a special parameter
as part of the query string (such as 'precompile=true') and modify the
code for each page so that if the parameter is found, the page does
nothing.  However, Tomcat has still compiled it.

Then all you need is some kind of script (using cURL or a similar tool)
that fetches each page and adds a '?precompile=true' suffix.  Deploy,
run the script, and all your pages are precompiled.

Low-tech, I agree, and I suspect others on the list will be able to come
up with a better approach.

- Peter

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



Re: compile precompile jsps at runtime

2005-09-06 Thread Tim Funk

A lot of custom coding on your own.

You'd need a filter which traps all your precompiled servlet mappings and 
then checks to see of the jsp the file was mapped to has changed. Then you'd 
need to somehow manage compiling the JSP and loading the class file while 
ignoring the existing mapping. In a nutshell ... not pretty.


Or you can have tomcat run in production mode (for the jsp servlet) and all 
the jsp's get compiled in the background when they are changed. But this 
relies on jsps NOT being precompiled.


-Tim

Zachi Hazan wrote:


So, how can I do it with tomcat not "out of the box"?

Tim Funk wrote:


Can't with tomcat out of the box.

-Tim

Zachi Hazan wrote:


Hi all,
Is there a way to compile precompiled jsp at runtime?
i.e., I want to precompiled my jsp before deployment, but after they 
are deployed I still want to make changes to the jsps that will take 
effect immediately.
I want to be able to change  jsp and see the changes immediately 
although they are precompiled

Does anyone knows how to do it?



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



Re: Pre-compiled JSPs?

2005-09-06 Thread Tim Funk
From the jasper task all the [valid] jsp's are turned into java files and 
compiled into class files. Those class files need to be a jar file in 
WEB-INF/lib or inside WEB-INF/classes. The jasper task can also rewrite 
web.xml so that all the mappings from the JSP --> class file are taken care of.


Once all the jsp's are compiled and mapped in web.xml. They can be deleted 
from the deployment war file (or dir).



-Tim

Richard Burman wrote:


Hi Tim,

Yeah, that's my exact issue, except the pages somewhat more complicated
than your example. ;o)

I've tried renaming one of them to jspf and, unsurprisingly, it has been
ignored by the JSP compiler. I'll have to take your word that it would
still work in the parent (once the reference had been changed to point
to jspf, not jsp) as I don't have a test bed up and running at the
moment.

Okay, so we've ascertained how to avoid the 'fragments' being compiled
because they're effectively not valid JSP pages because they use beans
that are never declared within themselves. The 'parent' page will
compile because it has all it needs to be compiled but the fragment
cannot be compiled without the presence of the parent. Does this mean
that I can only include the 'parent' JSPs in my JAR file and included in
my web.xml? Do I have to keep the fragments as raw JSPs in my webapp,
then? I'd really rather get them all together in a JAR, if possible,
which is why I'm on this voyage of discovery! :o)



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



Re: compile precompile jsps at runtime

2005-09-06 Thread Zachi Hazan

So, how can I do it with tomcat not "out of the box"?

Tim Funk wrote:


Can't with tomcat out of the box.

-Tim

Zachi Hazan wrote:


Hi all,
Is there a way to compile precompiled jsp at runtime?
i.e., I want to precompiled my jsp before deployment, but after they 
are deployed I still want to make changes to the jsps that will take 
effect immediately.
I want to be able to change  jsp and see the changes immediately 
although they are precompiled

Does anyone knows how to do it?



-
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: Pre-compiled JSPs?

2005-09-06 Thread Richard Burman
Hi Tim,

Yeah, that's my exact issue, except the pages somewhat more complicated
than your example. ;o)

I've tried renaming one of them to jspf and, unsurprisingly, it has been
ignored by the JSP compiler. I'll have to take your word that it would
still work in the parent (once the reference had been changed to point
to jspf, not jsp) as I don't have a test bed up and running at the
moment.

Okay, so we've ascertained how to avoid the 'fragments' being compiled
because they're effectively not valid JSP pages because they use beans
that are never declared within themselves. The 'parent' page will
compile because it has all it needs to be compiled but the fragment
cannot be compiled without the presence of the parent. Does this mean
that I can only include the 'parent' JSPs in my JAR file and included in
my web.xml? Do I have to keep the fragments as raw JSPs in my webapp,
then? I'd really rather get them all together in a JAR, if possible,
which is why I'm on this voyage of discovery! :o)

I really appreciate your help with this.

Regards,
Richard.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 15:57
To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?

For example:

File a.jsp
<% String worldVar = null; %>
<[EMAIL PROTECTED] file='b.jsp'%>
Hello  <%=worldVar%>

File b.jsp
<%worldVar = "world"%>


Notice b.jsp will not precompile. But then again - no one should be
calling 
b.jsp since its not a jsp - its a jsp fragment. It should be calld
b.jspf.

I am guessing - your pages have a similar issue.

-Tim


Richard Burman wrote:

> Sorry, I don't understand. How will my JSP compile at all if a section
> (fragment) is ignored and, presumably, omitted from the resulting java
> file?
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED] 
> Sent: 06 September 2005 15:05
> To: Tomcat Users List
> Subject: Re: Pre-compiled JSPs?
> 
> errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean
is
> used 
> without a default constructor being available.
> 
> If you are using include files which were as meant as compile time
> include 
> fragments, rename them (the include files) to jspf and they will be
> ignored 
> by the jsp compiler.
> 
> -Tim
> 


-
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: compile precompile jsps at runtime

2005-09-06 Thread Tim Funk

Can't with tomcat out of the box.

-Tim

Zachi Hazan wrote:


Hi all,
Is there a way to compile precompiled jsp at runtime?
i.e., I want to precompiled my jsp before deployment, but after they are 
deployed I still want to make changes to the jsps that will take effect 
immediately.
I want to be able to change  jsp and see the changes immediately 
although they are precompiled

Does anyone knows how to do it?



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



Re: Pre-compiled JSPs?

2005-09-06 Thread Tim Funk

For example:

File a.jsp
<% String worldVar = null; %>
<[EMAIL PROTECTED] file='b.jsp'%>
Hello  <%=worldVar%>

File b.jsp
<%worldVar = "world"%>


Notice b.jsp will not precompile. But then again - no one should be calling 
b.jsp since its not a jsp - its a jsp fragment. It should be calld b.jspf.


I am guessing - your pages have a similar issue.

-Tim


Richard Burman wrote:


Sorry, I don't understand. How will my JSP compile at all if a section
(fragment) is ignored and, presumably, omitted from the resulting java
file?

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 15:05

To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?

errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean is
used 
without a default constructor being available.


If you are using include files which were as meant as compile time
include 
fragments, rename them (the include files) to jspf and they will be
ignored 
by the jsp compiler.


-Tim




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



compile precompile jsps at runtime

2005-09-06 Thread Zachi Hazan

Hi all,
Is there a way to compile precompiled jsp at runtime?
i.e., I want to precompiled my jsp before deployment, but after they are 
deployed I still want to make changes to the jsps that will take effect 
immediately.
I want to be able to change  jsp and see the changes immediately 
although they are precompiled

Does anyone knows how to do it?


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



RE: Pre-compiled JSPs?

2005-09-06 Thread Richard Burman
Sorry, I don't understand. How will my JSP compile at all if a section
(fragment) is ignored and, presumably, omitted from the resulting java
file?

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 15:05
To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?

errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean is
used 
without a default constructor being available.

If you are using include files which were as meant as compile time
include 
fragments, rename them (the include files) to jspf and they will be
ignored 
by the jsp compiler.

-Tim

Richard Burman wrote:

> Ah, I thought it was all too good to be true. Now that I have an
> understanding of how to put it all together, I have given it a go but
> hit another snag.
> 
> Remember the use of the 'errorOnUseBeanInvalidClassAttribute' flag?
> Well, of course, that means that when the JSPs were turned into Java
> classes, they ignored the fact that the bean wasn't declared in that
JSP
> and generated the classes regardless. What about when you try to
compile
> the Java into a .class file? Suddenly, the Java is missing a variable
> declaration and cannot compile the class. Is there a way round this?
If
> not, what's the point in including the flag?!
>  

-
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: Pre-compiled JSPs?

2005-09-06 Thread Tim Funk
errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean is used 
without a default constructor being available.


If you are using include files which were as meant as compile time include 
fragments, rename them (the include files) to jspf and they will be ignored 
by the jsp compiler.


-Tim

Richard Burman wrote:


Ah, I thought it was all too good to be true. Now that I have an
understanding of how to put it all together, I have given it a go but
hit another snag.

Remember the use of the 'errorOnUseBeanInvalidClassAttribute' flag?
Well, of course, that means that when the JSPs were turned into Java
classes, they ignored the fact that the bean wasn't declared in that JSP
and generated the classes regardless. What about when you try to compile
the Java into a .class file? Suddenly, the Java is missing a variable
declaration and cannot compile the class. Is there a way round this? If
not, what's the point in including the flag?!
 


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



RE: Pre-compiled JSPs?

2005-09-06 Thread Richard Burman
Ah, I thought it was all too good to be true. Now that I have an
understanding of how to put it all together, I have given it a go but
hit another snag.

Remember the use of the 'errorOnUseBeanInvalidClassAttribute' flag?
Well, of course, that means that when the JSPs were turned into Java
classes, they ignored the fact that the bean wasn't declared in that JSP
and generated the classes regardless. What about when you try to compile
the Java into a .class file? Suddenly, the Java is missing a variable
declaration and cannot compile the class. Is there a way round this? If
not, what's the point in including the flag?!

Yours,
Confused of UK. ;o)

-Original Message-
From: Richard Burman [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 13:50
To: Tomcat Users List
Subject: RE: Pre-compiled JSPs?

Eureka! I get it now. :)

Indeed, I hadn't noticed the servlet-mapping section down the bottom. I
looked at the xml and foolishly assumed that it merely repeated all the
way to the bottom. Now that you've pointed out that, it all makes sense.

Thanks for all your help, I shall have a play and hopefully have new,
sparkly, compiled JSPs soon!

Richard.

-Original Message-
From: Darryl L. Miles [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 12:33
To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?


What you see looks like normal jasper name mangling of generated pages.

You use: http://myserver:8080/RichardsApp/DoSomething.jsp


I presume there is also a generated mapping entry, that you may have 
overlooked:


  RichardsApp.DoSomething_jsp
  /DoSomething.jsp


Richard Burman wrote:

>Hi Nicolas,
>
>Thanks for your reply, I really appreciate your help. I'm not sure I
>fully understand your solution. I see now that the webXmlFragment
>provides a convenient way to generate the XML needed for the Servlets
>but that have bizarre names.
>
>Let's say I have a jsp:
>/RichardsApp/DoSomething.jsp
>
>Running Jasper at it provides a java file:
>/RichardsApp/DoSomething_jsp.java
>
>Then the Servlet definition would be:
>
>  RichardsApp.DoSomething_jsp
>  RichardsApp.DoSomething_jsp
>
>
>The way to reference my JSP used to be:
>http://myserver:8080/RichardsApp/DoSomething.jsp
>
>What would the new reference be?
>http://myserver:8080/RichardsApp/DoSomething_jsp
>or
>http://myserver:8080/RichardsApp/DoSomething
>
>Have I missed something obvious?
>
>Thanks for your help!
>Richard.
>  
>

-- 
Darryl L. Miles



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


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



RE: Pre-compiled JSPs?

2005-09-06 Thread Richard Burman
Eureka! I get it now. :)

Indeed, I hadn't noticed the servlet-mapping section down the bottom. I
looked at the xml and foolishly assumed that it merely repeated all the
way to the bottom. Now that you've pointed out that, it all makes sense.

Thanks for all your help, I shall have a play and hopefully have new,
sparkly, compiled JSPs soon!

Richard.

-Original Message-
From: Darryl L. Miles [mailto:[EMAIL PROTECTED] 
Sent: 06 September 2005 12:33
To: Tomcat Users List
Subject: Re: Pre-compiled JSPs?


What you see looks like normal jasper name mangling of generated pages.

You use: http://myserver:8080/RichardsApp/DoSomething.jsp


I presume there is also a generated mapping entry, that you may have 
overlooked:


  RichardsApp.DoSomething_jsp
  /DoSomething.jsp


Richard Burman wrote:

>Hi Nicolas,
>
>Thanks for your reply, I really appreciate your help. I'm not sure I
>fully understand your solution. I see now that the webXmlFragment
>provides a convenient way to generate the XML needed for the Servlets
>but that have bizarre names.
>
>Let's say I have a jsp:
>/RichardsApp/DoSomething.jsp
>
>Running Jasper at it provides a java file:
>/RichardsApp/DoSomething_jsp.java
>
>Then the Servlet definition would be:
>
>  RichardsApp.DoSomething_jsp
>  RichardsApp.DoSomething_jsp
>
>
>The way to reference my JSP used to be:
>http://myserver:8080/RichardsApp/DoSomething.jsp
>
>What would the new reference be?
>http://myserver:8080/RichardsApp/DoSomething_jsp
>or
>http://myserver:8080/RichardsApp/DoSomething
>
>Have I missed something obvious?
>
>Thanks for your help!
>Richard.
>  
>

-- 
Darryl L. Miles



-
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: Pre-compiled JSPs?

2005-09-06 Thread Darryl L. Miles


What you see looks like normal jasper name mangling of generated pages.

You use: http://myserver:8080/RichardsApp/DoSomething.jsp


I presume there is also a generated mapping entry, that you may have 
overlooked:



 RichardsApp.DoSomething_jsp
 /DoSomething.jsp


Richard Burman wrote:


Hi Nicolas,

Thanks for your reply, I really appreciate your help. I'm not sure I
fully understand your solution. I see now that the webXmlFragment
provides a convenient way to generate the XML needed for the Servlets
but that have bizarre names.

Let's say I have a jsp:
/RichardsApp/DoSomething.jsp

Running Jasper at it provides a java file:
/RichardsApp/DoSomething_jsp.java

Then the Servlet definition would be:

 RichardsApp.DoSomething_jsp
 RichardsApp.DoSomething_jsp


The way to reference my JSP used to be:
http://myserver:8080/RichardsApp/DoSomething.jsp

What would the new reference be?
http://myserver:8080/RichardsApp/DoSomething_jsp
or
http://myserver:8080/RichardsApp/DoSomething

Have I missed something obvious?

Thanks for your help!
Richard.
 



--
Darryl L. Miles



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



RE: Pre-compiled JSPs?

2005-09-06 Thread Richard Burman
Hi Nicolas,

Thanks for your reply, I really appreciate your help. I'm not sure I
fully understand your solution. I see now that the webXmlFragment
provides a convenient way to generate the XML needed for the Servlets
but that have bizarre names.

Let's say I have a jsp:
/RichardsApp/DoSomething.jsp

Running Jasper at it provides a java file:
/RichardsApp/DoSomething_jsp.java

Then the Servlet definition would be:

  RichardsApp.DoSomething_jsp
  RichardsApp.DoSomething_jsp


The way to reference my JSP used to be:
http://myserver:8080/RichardsApp/DoSomething.jsp

What would the new reference be?
http://myserver:8080/RichardsApp/DoSomething_jsp
or
http://myserver:8080/RichardsApp/DoSomething

Have I missed something obvious?

Thanks for your help!
Richard.


-Original Message-
From: Karasek-XID, Nicolas [mailto:[EMAIL PROTECTED] 
Sent: 05 September 2005 12:04
To: Tomcat Users List
Subject: RE: Pre-compiled JSPs?

Hi,

You need to insert in your web.xml the reference to the precompiled
servlets. Jasper can generate a web.xml fragment when turning JSP into
servlets. You can then insert the fragment into your web.xml
Something like this with ant:










<!-- jsp-servlets will be inserted here - do not remove
this line -->




-Original Message-
From: Richard Burman [mailto:[EMAIL PROTECTED] 
Sent: lundi 5 septembre 2005 12:44
To: Tomcat Users List
Subject: Pre-compiled JSPs?

Hi everyone,

I have a fairly elaborate problem but hope that some people out there
can help with it.

I am trying to take a large webapp and create pre-compiled JSPs. We
already compile the java into class files, then package in JARs, then
finally a WAR, but we would like to be able to package the JSPs into a
neat package, too.

The first hurdle was trying to circumvent the issue of when JSPs include
each other and a bean is used in both JSPs but can only be declared once
when the JSPs are combined. Thus, you have to leave out the bean
declaration in the second JSP but then it will not compile on it's own
because it has no knowledge of the bean. Fortunately, in the recent
Tomcat releases, it's possible to use the flag
'errorOnUseBeanInvalidClassAttribute' to ignore this problem.

Once the JSPs have been turned into Java classes by Jasper2, it's not
too hard to compile them into class files. But how do you deploy these
compiled classes so that Tomcat knows to use them? If the Whatever.jsp
file doesn't exist, how does Tomcat know where or how to find the
compiled JSP file? Should I put them in a JAR and deploy somewhere? Do I
need to change the web.xml or similar to inform Tomcat about this?

If anyone has any suggestions, advice or solutions to this, I would be
eternally grateful! :)

Thanks,
Richard.

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


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



RE: Pre-compiled JSPs?

2005-09-05 Thread Karasek-XID, Nicolas
Hi,

You need to insert in your web.xml the reference to the precompiled
servlets. Jasper can generate a web.xml fragment when turning JSP into
servlets. You can then insert the fragment into your web.xml
Something like this with ant:










<!-- jsp-servlets will be inserted here - do not remove
this line -->




-Original Message-
From: Richard Burman [mailto:[EMAIL PROTECTED] 
Sent: lundi 5 septembre 2005 12:44
To: Tomcat Users List
Subject: Pre-compiled JSPs?

Hi everyone,

I have a fairly elaborate problem but hope that some people out there
can help with it.

I am trying to take a large webapp and create pre-compiled JSPs. We
already compile the java into class files, then package in JARs, then
finally a WAR, but we would like to be able to package the JSPs into a
neat package, too.

The first hurdle was trying to circumvent the issue of when JSPs include
each other and a bean is used in both JSPs but can only be declared once
when the JSPs are combined. Thus, you have to leave out the bean
declaration in the second JSP but then it will not compile on it's own
because it has no knowledge of the bean. Fortunately, in the recent
Tomcat releases, it's possible to use the flag
'errorOnUseBeanInvalidClassAttribute' to ignore this problem.

Once the JSPs have been turned into Java classes by Jasper2, it's not
too hard to compile them into class files. But how do you deploy these
compiled classes so that Tomcat knows to use them? If the Whatever.jsp
file doesn't exist, how does Tomcat know where or how to find the
compiled JSP file? Should I put them in a JAR and deploy somewhere? Do I
need to change the web.xml or similar to inform Tomcat about this?

If anyone has any suggestions, advice or solutions to this, I would be
eternally grateful! :)

Thanks,
Richard.

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



Pre-compiled JSPs?

2005-09-05 Thread Richard Burman
Hi everyone,

I have a fairly elaborate problem but hope that some people out there
can help with it.

I am trying to take a large webapp and create pre-compiled JSPs. We
already compile the java into class files, then package in JARs, then
finally a WAR, but we would like to be able to package the JSPs into a
neat package, too.

The first hurdle was trying to circumvent the issue of when JSPs include
each other and a bean is used in both JSPs but can only be declared once
when the JSPs are combined. Thus, you have to leave out the bean
declaration in the second JSP but then it will not compile on it's own
because it has no knowledge of the bean. Fortunately, in the recent
Tomcat releases, it's possible to use the flag
'errorOnUseBeanInvalidClassAttribute' to ignore this problem.

Once the JSPs have been turned into Java classes by Jasper2, it's not
too hard to compile them into class files. But how do you deploy these
compiled classes so that Tomcat knows to use them? If the Whatever.jsp
file doesn't exist, how does Tomcat know where or how to find the
compiled JSP file? Should I put them in a JAR and deploy somewhere? Do I
need to change the web.xml or similar to inform Tomcat about this?

If anyone has any suggestions, advice or solutions to this, I would be
eternally grateful! :)

Thanks,
Richard.

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



RE: tomcat 5.5.9 not recompiling JSPs

2005-08-22 Thread Michal Kwiatek
Thanks for the hint - I'm checking it and it's been OK up to now. Since
the behaviour was not deterministic in the past, I have to test it some
more - I'll do it tomorrow.

One more question: was it not deterministic (meaning that sometimes it
worked and sometimes did not) in your case too? If so, we should signal
it as a bug...

In my case, the precompiled classes for jsps under ${CATALINA_HOME}/work
were sometimes not deleted after I undeployed the application. It really
looks like a bug to me.

Cheers,
Michal. 

> -Original Message-
> From: Mark Hagger [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 22, 2005 3:21 PM
> To: Tomcat Users List
> Subject: Re: tomcat 5.5.9 not recompiling JSPs
> 
> I had a similar problem, I wouldn't go so far as to say I 
> have a solution, but fiddling with the /conf/web.xml 
> file to have the following in its "jsp" section seemed to 
> help a bit (currently used for our demo level systems):
> 
> 
> jsp 
> org.apache.jasper.servlet.JspServlet
> 
> fork
> false
> 
> 
> development
> false
> 
> 
> reloading
> true
> 
> 
> checkInterval
> 120
> 
> 
> xpoweredBy
> false
>     
> 3
> 
> 
> Although to be honest I suspect that the best solution for 
> production boxes is to pre-compile all jsps into the war file anyway.
> 
> Mark
> 
> 
> On Mon, 2005-08-22 at 14:24 +0200, Michal Kwiatek wrote:
> > I've just noticed that on tomcat 5.5.9 JSPs unpacked by 
> tomcat from a 
> > deployed war file have creation dates pointing to the time when the 
> > files were first created. On tomcat 5.0.28 unpacked files have 
> > creation dates pointing to time when they were unpacked 
> (i.e created 
> > on this file system). Perhaps this is the reason for 
> strange problems 
> > with JSP recompilation?
> 
> 
> 
> __
> __
> This email has been scanned for all known viruses by the 
> MessageLabs SkyScan service.
> 
> -
> 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]



AW: tomcat 5.5.9 not recompiling JSPs

2005-08-22 Thread Bernhard Slominski
You're both right.
But when you run your Webapplication under non-tomcat container you need the
tomcat libraries.
Also when going to dfferent versions of tomcat, so e.g. from 4 to 5.5 you
might get compatibility issues.

Bernhard 

> -Ursprüngliche Nachricht-
> Von: Allistair Crossley [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 22. August 2005 16:14
> An: Tomcat Users List
> Cc: [EMAIL PROTECTED]
> Betreff: RE: tomcat 5.5.9 not recompiling JSPs
> 
> 
> compiled pages are just classes, and so long as they are 
> mapped correctly in the web.xml you'll be ok.
> 
> > -Original Message-
> > From: Paul Singleton [mailto:[EMAIL PROTECTED]
> > Sent: 22 August 2005 15:13
> > To: Tomcat Users List
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: tomcat 5.5.9 not recompiling JSPs
> > 
> > 
> > Mark Hagger wrote:
> > > ...
> > > Although to be honest I suspect that the best solution for 
> > production
> > > boxes is to pre-compile all jsps into the war file anyway.
> > 
> > Is this possible?  Don't different containers store the
> > compiled pages in different places, with different names?
> > 
> > Paul Singleton
> > 
> > 
> > -- 
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.338 / Virus Database: 267.10.13/78 - Release 
> > Date: 19/Aug/2005
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
>  
> ---
> QAS Ltd.
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> ---
> 
> 
> 
> -
> 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: tomcat 5.5.9 not recompiling JSPs

2005-08-22 Thread Allistair Crossley
compiled pages are just classes, and so long as they are mapped correctly in 
the web.xml you'll be ok.

> -Original Message-
> From: Paul Singleton [mailto:[EMAIL PROTECTED]
> Sent: 22 August 2005 15:13
> To: Tomcat Users List
> Cc: [EMAIL PROTECTED]
> Subject: Re: tomcat 5.5.9 not recompiling JSPs
> 
> 
> Mark Hagger wrote:
> > ...
> > Although to be honest I suspect that the best solution for 
> production
> > boxes is to pre-compile all jsps into the war file anyway.
> 
> Is this possible?  Don't different containers store the
> compiled pages in different places, with different names?
> 
> Paul Singleton
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.10.13/78 - Release 
> Date: 19/Aug/2005
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: tomcat 5.5.9 not recompiling JSPs

2005-08-22 Thread Paul Singleton

Mark Hagger wrote:

...
Although to be honest I suspect that the best solution for production
boxes is to pre-compile all jsps into the war file anyway.


Is this possible?  Don't different containers store the
compiled pages in different places, with different names?

Paul Singleton


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.13/78 - Release Date: 19/Aug/2005


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



Re: tomcat 5.5.9 not recompiling JSPs

2005-08-22 Thread Mark Hagger
I had a similar problem, I wouldn't go so far as to say I have a
solution, but fiddling with the /conf/web.xml file to have the
following in its "jsp" section seemed to help a bit (currently used for
our demo level systems):


jsp
org.apache.jasper.servlet.JspServlet

fork
false


development
false


reloading
true


checkInterval
120


xpoweredBy
false

3


Although to be honest I suspect that the best solution for production
boxes is to pre-compile all jsps into the war file anyway.

Mark


On Mon, 2005-08-22 at 14:24 +0200, Michal Kwiatek wrote:
> I've just noticed that on tomcat 5.5.9 JSPs unpacked by tomcat from a
> deployed war file have creation dates pointing to the time when the
> files were first created. On tomcat 5.0.28 unpacked files have creation
> dates pointing to time when they were unpacked (i.e created on this file
> system). Perhaps this is the reason for strange problems with JSP
> recompilation?




This email has been scanned for all known viruses by the MessageLabs SkyScan 
service.

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



tomcat 5.5.9 not recompiling JSPs

2005-08-22 Thread Michal Kwiatek
I've just noticed that on tomcat 5.5.9 JSPs unpacked by tomcat from a
deployed war file have creation dates pointing to the time when the
files were first created. On tomcat 5.0.28 unpacked files have creation
dates pointing to time when they were unpacked (i.e created on this file
system). Perhaps this is the reason for strange problems with JSP
recompilation?

This problem comes and goes after I restart tomcat. What might be the
reason?

Michal.

> > Michal Kwiatek wrote:
> > 
> > >Hello,
> > >
> > >I have a problem with tomcat 5.5.9 - for some reason 
> tomcat does not 
> > >recompile JSPs after I redeploy the application using manager 
> > >application.
> > >There's no error message in the logs, tomcat has write
> > access to work
> > >directory and it compiles new jsps. It simply does not 
> recompile the 
> > >existing ones.
> > >
> > >Have you seen such behaviour in the past?
> > >
> > >Thanks in advance,
> > >Michal.
> > >
> > 
> >-
> > >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]
> > 
> > 
> 
> -
> 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: tomcat 5.5.9 not recompiling JSPs

2005-08-21 Thread Michal Kwiatek
Well, I don't have a context.xml file! I'm not using one for this app,
and AFAK, tomcat creates context automatically in memory for the
application. 

Anyway, my context.xml file is not corrupted, because there's none. 

Any other idea perhaps?

Thanks,
Michal.

> -Original Message-
> From: Sean Rowe [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 22, 2005 8:32 AM
> To: Tomcat Users List
> Subject: Re: tomcat 5.5.9 not recompiling JSPs
> 
> I saw this just today.  I did some digging and realized that 
> my application context file, usually found under $ 
> CATALNA_HOME/conf/Catalina/localhost was messed up.  After I 
> fixed whatever problem it was, I was able to deploy again. 
> 
> Michal Kwiatek wrote:
> 
> >Hello,
> >
> >I have a problem with tomcat 5.5.9 - for some reason tomcat does not 
> >recompile JSPs after I redeploy the application using manager 
> >application.
> >There's no error message in the logs, tomcat has write 
> access to work 
> >directory and it compiles new jsps. It simply does not recompile the 
> >existing ones.
> >
> >Have you seen such behaviour in the past?
> >
> >Thanks in advance,
> >Michal.
> >
> >-
> >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]
> 
> 

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



Re: tomcat 5.5.9 not recompiling JSPs

2005-08-21 Thread Sean Rowe
I saw this just today.  I did some digging and realized that my 
application context file, usually found under $ 
CATALNA_HOME/conf/Catalina/localhost was messed up.  After I fixed 
whatever problem it was, I was able to deploy again. 


Michal Kwiatek wrote:


Hello,

I have a problem with tomcat 5.5.9 - for some reason tomcat does not
recompile JSPs after I redeploy the application using manager
application.
There's no error message in the logs, tomcat has write access to work
directory and it compiles new jsps. It simply does not recompile the
existing ones. 


Have you seen such behaviour in the past?

Thanks in advance,
Michal.

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



tomcat 5.5.9 not recompiling JSPs

2005-08-21 Thread Michal Kwiatek
Hello,

I have a problem with tomcat 5.5.9 - for some reason tomcat does not
recompile JSPs after I redeploy the application using manager
application.
There's no error message in the logs, tomcat has write access to work
directory and it compiles new jsps. It simply does not recompile the
existing ones. 

Have you seen such behaviour in the past?

Thanks in advance,
Michal.

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



SAX warnings when compiling JSPs using Taglibs - 5.0.30

2005-08-11 Thread Jean-Francois Beaulac
Hi,
 
I don't know when this started to happen but suddenly those warning messages
started to show up every time a JSP page is compiled. Has anyone got these
message before, if yes how do we get rid of these?
 
ParserUtils: warning org.xml.sax.SAXParseException: URI was not reported to
parser for entity [document]
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope URI is
absolute:  <http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd>
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope this
SYSTEM id is absolute:  <http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd>
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not reported to
parser for entity [dtd]
ParserUtils: warning org.xml.sax.SAXParseException: missing system ID, using
<http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd>
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd 
 
Here is a snippet from my tld file : 

 
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd";>

1.0
1.2
flow_taglib
/flow_taglib
flow_taglib
 
Taglib to simplify flow2 layout



and this is how in load the taglib in the JSPs files:
<[EMAIL PROTECTED] uri="/WEB-INF/tlds/flow_taglib.tld" prefix="flow"%>
 
Thanks
 
--
Jean-Francois Beaulac
[EMAIL PROTECTED]
 


Re: Tomcat 5.5.9 - When JSPs change, gives error "org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated"

2005-07-12 Thread Craig Dixon
Got mod_jk running; that's not the issue. 

Another curious piece to this anomaly is that making a change and then
restarting server does not head off the error. I have to make the
change, access the page (thus generating the error) THEN restart the
server and access the page again, at which point the error is
corrected.

If I change more than one page, I have to access one page, restart the
server, access the second page, restart the server again, etc. Why
should accessing the page and throwing the error make any difference?
Why does restarting the server not help unless the error is thrown
first? Can anybody help me with this? It's driving me nuts!

On 7/11/05, Craig Dixon <[EMAIL PROTECTED]> wrote:
> Another thought that just occurred to me is that the problem could be
> my use of the mod_jk2 connector. Could this be it?
> 
> I'd like to use the mod_jk connector, since jk2 is deprecated, but I
> haven't been able to make it work. I wish I could find some
> instructions for setting up mod_jk that are as clear and concise as
> these for mod_jk2: http://mpcon.org/apacheguide/#jsp
> 
> Any suggestions?
> 
> On 7/11/05, Craig Dixon <[EMAIL PROTECTED]> wrote:
> > Yes, I am running JDK 1.5.0_03. Is there any problem between Tomcat
> > and this JDK?
> >
> > On 7/11/05, Tim Diggins <[EMAIL PROTECTED]> wrote:
> > > I don't know the answer, but can you confirm you are either:
> > >
> > > 1) using jdk 1.5
> > > or
> > > 2) using jdk 1.4 (and with the compatibility package for tomcat 5.5)
> > >
> > > as the compatibility package (as I understand it) addresses xml parser
> > > versioning/instantiation issues.
> > >
> > > -- Tim
> > >
> > >
> > >
> > > Craig Dixon wrote:
> > > > I've encountered a strange problem with my JSPs in Tomcat. Whenever I
> > > > change one of them, then try to access it from the browser, I get the
> > > > following error:
> > > >
> > > > HTTP Status 500 -
> > > >
> > > > type Exception report
> > > >
> > > > message
> > > >
> > > > description The server encountered an internal error () that prevented
> > > > it from fulfilling this request.
> > > >
> > > > exception
> > > >
> > > > javax.servlet.ServletException: Provider
> > > > org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
> > > > java.lang.NullPointerException
> > > >   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
> > > >   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > > >
> > > > root cause
> > > >
> > > > javax.xml.parsers.FactoryConfigurationError: Provider
> > > > org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
> > > > java.lang.NullPointerException
> > > >   javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
> > > >   
> > > > org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152)
> > > >   
> > > > org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)
> > > >   
> > > > org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750)
> > > >   
> > > > org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527)
> > > >   org.apache.jasper.compiler.Validator.validate(Validator.java:1495)
> > > >   
> > > > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
> > > >   org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> > > >   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> > > >   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> > > >   
> > > > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
> > > >   
> > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
> > > >   
> > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> > > >   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > > >   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > > >
> > > > note The full stack trace of the root cause is available in the Apache
> > > > Tomcat/5.5.

Re: Tomcat 5.5.9 - When JSPs change, gives error "org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated"

2005-07-11 Thread Craig Dixon
Another thought that just occurred to me is that the problem could be
my use of the mod_jk2 connector. Could this be it?

I'd like to use the mod_jk connector, since jk2 is deprecated, but I
haven't been able to make it work. I wish I could find some
instructions for setting up mod_jk that are as clear and concise as
these for mod_jk2: http://mpcon.org/apacheguide/#jsp

Any suggestions?

On 7/11/05, Craig Dixon <[EMAIL PROTECTED]> wrote:
> Yes, I am running JDK 1.5.0_03. Is there any problem between Tomcat
> and this JDK?
> 
> On 7/11/05, Tim Diggins <[EMAIL PROTECTED]> wrote:
> > I don't know the answer, but can you confirm you are either:
> >
> > 1) using jdk 1.5
> > or
> > 2) using jdk 1.4 (and with the compatibility package for tomcat 5.5)
> >
> > as the compatibility package (as I understand it) addresses xml parser
> > versioning/instantiation issues.
> >
> > -- Tim
> >
> >
> >
> > Craig Dixon wrote:
> > > I've encountered a strange problem with my JSPs in Tomcat. Whenever I
> > > change one of them, then try to access it from the browser, I get the
> > > following error:
> > >
> > > HTTP Status 500 -
> > >
> > > type Exception report
> > >
> > > message
> > >
> > > description The server encountered an internal error () that prevented
> > > it from fulfilling this request.
> > >
> > > exception
> > >
> > > javax.servlet.ServletException: Provider
> > > org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
> > > java.lang.NullPointerException
> > >   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
> > >   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > >
> > > root cause
> > >
> > > javax.xml.parsers.FactoryConfigurationError: Provider
> > > org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
> > > java.lang.NullPointerException
> > >   javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
> > >   
> > > org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152)
> > >   
> > > org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)
> > >   
> > > org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750)
> > >   
> > > org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527)
> > >   org.apache.jasper.compiler.Validator.validate(Validator.java:1495)
> > >   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
> > >   org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> > >   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> > >   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> > >   
> > > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
> > >   
> > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
> > >   
> > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> > >   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > >   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > >
> > > note The full stack trace of the root cause is available in the Apache
> > > Tomcat/5.5.9 logs.
> > >
> > >
> > >
> > > I don't have the foggiest idea what that means, but when I stop and
> > > restart Tomcat, everything usually works fine (until the next time I
> > > change the file.)
> > >
> > > I'd send relevant source code, but it seems to happen with every page
> > > in multiple applications. I've posted this in several forums and have
> > > yet to even get a reply. This is driving me batty! Any ideas?
> > >
> > > -
> > > 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]
> >
> >
>

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



Re: Tomcat 5.5.9 - When JSPs change, gives error "org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated"

2005-07-11 Thread Craig Dixon
Yes, I am running JDK 1.5.0_03. Is there any problem between Tomcat
and this JDK?

On 7/11/05, Tim Diggins <[EMAIL PROTECTED]> wrote:
> I don't know the answer, but can you confirm you are either:
> 
> 1) using jdk 1.5
> or
> 2) using jdk 1.4 (and with the compatibility package for tomcat 5.5)
> 
> as the compatibility package (as I understand it) addresses xml parser
> versioning/instantiation issues.
> 
> -- Tim
> 
> 
> 
> Craig Dixon wrote:
> > I've encountered a strange problem with my JSPs in Tomcat. Whenever I
> > change one of them, then try to access it from the browser, I get the
> > following error:
> >
> > HTTP Status 500 -
> >
> > type Exception report
> >
> > message
> >
> > description The server encountered an internal error () that prevented
> > it from fulfilling this request.
> >
> > exception
> >
> > javax.servlet.ServletException: Provider
> > org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
> > java.lang.NullPointerException
> >   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
> >   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> > root cause
> >
> > javax.xml.parsers.FactoryConfigurationError: Provider
> > org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
> > java.lang.NullPointerException
> >   javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
> >   
> > org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152)
> >   
> > org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)
> >   
> > org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750)
> >   
> > org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527)
> >   org.apache.jasper.compiler.Validator.validate(Validator.java:1495)
> >   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
> >   org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> >   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> >   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> >   
> > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
> >   
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
> >   
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> >   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> >   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> > note The full stack trace of the root cause is available in the Apache
> > Tomcat/5.5.9 logs.
> >
> >
> >
> > I don't have the foggiest idea what that means, but when I stop and
> > restart Tomcat, everything usually works fine (until the next time I
> > change the file.)
> >
> > I'd send relevant source code, but it seems to happen with every page
> > in multiple applications. I've posted this in several forums and have
> > yet to even get a reply. This is driving me batty! Any ideas?
> >
> > -
> > 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]
> 
>

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



Re: Tomcat 5.5.9 - When JSPs change, gives error "org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated"

2005-07-11 Thread Tim Diggins

I don't know the answer, but can you confirm you are either:

1) using jdk 1.5
or
2) using jdk 1.4 (and with the compatibility package for tomcat 5.5)

as the compatibility package (as I understand it) addresses xml parser 
versioning/instantiation issues.


-- Tim



Craig Dixon wrote:

I've encountered a strange problem with my JSPs in Tomcat. Whenever I
change one of them, then try to access it from the browser, I get the
following error:

HTTP Status 500 -
 
type Exception report
 
message
 
description The server encountered an internal error () that prevented

it from fulfilling this request.
 
exception
 
javax.servlet.ServletException: Provider

org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
java.lang.NullPointerException
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
root cause
 
javax.xml.parsers.FactoryConfigurationError: Provider

org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
java.lang.NullPointerException
javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)

org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152)

org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)

org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750)

org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527)
org.apache.jasper.compiler.Validator.validate(Validator.java:1495)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
note The full stack trace of the root cause is available in the Apache

Tomcat/5.5.9 logs.



I don't have the foggiest idea what that means, but when I stop and
restart Tomcat, everything usually works fine (until the next time I
change the file.)

I'd send relevant source code, but it seems to happen with every page
in multiple applications. I've posted this in several forums and have
yet to even get a reply. This is driving me batty! Any ideas?

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



Tomcat 5.5.9 - When JSPs change, gives error "org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated"

2005-07-08 Thread Craig Dixon
I've encountered a strange problem with my JSPs in Tomcat. Whenever I
change one of them, then try to access it from the browser, I get the
following error:

HTTP Status 500 -
 
type Exception report
 
message
 
description The server encountered an internal error () that prevented
it from fulfilling this request.
 
exception
 
javax.servlet.ServletException: Provider
org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
java.lang.NullPointerException
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
root cause
 
javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated:
java.lang.NullPointerException
javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)

org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152)

org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)

org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750)

org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527)
org.apache.jasper.compiler.Validator.validate(Validator.java:1495)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.9 logs.



I don't have the foggiest idea what that means, but when I stop and
restart Tomcat, everything usually works fine (until the next time I
change the file.)

I'd send relevant source code, but it seems to happen with every page
in multiple applications. I've posted this in several forums and have
yet to even get a reply. This is driving me batty! Any ideas?

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



Adding support for JSPs in Apache

2005-07-04 Thread Morten W. Petersen
Hi,

I'm adding support for JSPs on our server, so we can host a human rights
search engine (http://www.hurisearch.org/) which is powered by Fast
search technology.

I assume that it's possible to get JSP pages running in the same manner
as PHP pages do on Apache, and I'm wondering if there's a howto
somewhere that will explain the steps I need to take to do just that..

Thanks,

Morten

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

RE: Problem compiling JSPs with Tomcat as Windows Service

2005-07-04 Thread Peter Crowther
> From: Trevor Quinn [mailto:[EMAIL PROTECTED] 
> When I deploy a web application to a Windows 2K server 
> running Tomcat 5.0.28 and JDK 1.5, I see "Unable to compile 
> JSP" errors on every JSP page, but only when Tomcat is 
> running as a Windows service. When I run Tomcat from the 
> console window, all pages compile and display correctly.

Check file permissions on the files Tomcat is trying to access.  If you
think you might have problems in this area, filemon from
http://www.sysinternals.com is an invaluable debugging tool as it can
show you the file accesses (and the results) in realtime.

- Peter

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



Re: Problem compiling JSPs with Tomcat as Windows Service

2005-07-01 Thread Markus Schönhaber
Am Freitag, 1. Juli 2005 22:30 schrieb Trevor Quinn:
> When I deploy a web application to a Windows 2K server running Tomcat
> 5.0.28 and JDK 1.5, I see "Unable to compile JSP" errors on every JSP page,
> but only when Tomcat is running as a Windows service. When I run Tomcat
> from the console window, all pages compile and display correctly.
>
> I had read in another posting that this might have something to do with
> permissions. It said to make sure JAVA_HOME, TOMCAT_HOME, and PATH were
> defined as system variables, not user variables. This is the case, and I'm
> still seeing problems. Another posting recommended moving the Java
> lib/tools.jar file to the common/lib folder in Tomcat. That didn't seem to
> help either.
>
> Does anyone have any other ideas? Thanks!

Make sure that the account your tomcat service runs under (propably SYSTEM) 
has the appropriate permissions on the tomcat installation directories. 
Especially it must be granted writing permissions to the directories where 
tomcat puts the files created during JSP compilation (i. e. 
%CATALINA_BASE%\work by default).

Regards
  mks

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



Problem compiling JSPs with Tomcat as Windows Service

2005-07-01 Thread Trevor Quinn
Hi,

When I deploy a web application to a Windows 2K server running Tomcat 5.0.28 
and JDK 1.5, I see "Unable to compile JSP" errors on every JSP page, but only 
when Tomcat is running as a Windows service. When I run Tomcat from the console 
window, all pages compile and display correctly.

I had read in another posting that this might have something to do with 
permissions. It said to make sure JAVA_HOME, TOMCAT_HOME, and PATH were defined 
as system variables, not user variables. This is the case, and I'm still seeing 
problems. Another posting recommended moving the Java lib/tools.jar file to the 
common/lib folder in Tomcat. That didn't seem to help either.

Does anyone have any other ideas? Thanks!

Trevor



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



[OT] wildcard servlet mapping also catching jsps

2005-06-30 Thread Allistair Crossley
Hi Guys,

Having a real ball ache with a requirement. We want to handle any URL with a 
Spring controller (servlet for those not into Spring).

Therefore

http://ourserver/wacky/url
http://ourserver/something

We want coming to our controller. Why? Because we have fancy page lookup and 
redirect services that the servlet should use to send out the resultant JSP or 
redirect.

We run IIS -> JK -> Tomcat. To achieve getting arbitrary URLs into our 
controller we have

1. Mapping in JK's conf, i.e /*=ajp13 to route everything to the ajp13 tomcat 
worker.
2. Mapping in application web.xml for the controller servlet with mapping /* 
(everything!)
3. The Spring controller too needs a mapping itself /* but that's not really 
important I think.

So we make one of those requests. And sure enough it gets to our controller 
servlet. We're happy. Until what happens next. The controller, sends back a JSP 
view, probably via request forwarding or whatever. However, the web.xml /* 
mapping to the controller picks up the JSP request/forward whatever, and so the 
JSP is never run as we're in a loop.

Why oh why can't servlet-mapping elements allow for exclusions I don't know. 
Perhaps someone out there has an amazing idea that will ease the pain here :)

Looking forward to solutions if indeed there are any. 

All the best, Allistair

PS: I tried an ugly hack by adding the Tomcat JSP Servlet to my application 
web.xml and mapping *.jsp to it - did not work.



 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: [OT]: Adding content/JSPs on the fly: file.separtor

2005-05-29 Thread Tim Diggins

Hi -

I think it would be better to use java.io.File.separator (which will be 
identical to file.separator, but is clearer and compile-time checked for 
typos (as opposed to the string "file.separator" )).



Tim

egan0019 wrote:

When building file path strings, should one always use the
System.getProperty("file.separator") return value?  Is this to
differentiate between Windows("\") and unix/linux/solaris("/" separators? 
I haven't seen that property before.


And, are there any other things I should know about to make my file system
accessing code portable?

Yes, I am new to java.



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



RE: Adding content/JSPs on the fly

2005-05-27 Thread Steve Kirk

OK glad you've got that off yr chest ;)

I can sort of see yr point, but these are not issues that have troubled me
personally.  I tend to look at TC from the point of view of "I'm just
pleased that someone else wrote TC for me for free and it works v well at
what it is designed for".  Every product has limitations, and can't cover
every feature that we would all like, and I find it amazing that TC has so
few limitations given that it is produced on the backs of volunteer
contributions.  I'd rather have one TC that 2 IIS's ;)

If you're serious about pursuing a solution for this, Maybe there's an
alternative, how about this. (It's not pretty but saves some of the
reinvention that you describe).

Let's say it's an acceptable limitatio to create all your new JSPs to a
separate webapp folder.  This webapp only has a single servlet initially,
which is a type of "Invoker" that you write yourself, eg
/dynamicWebApp/JspInvoker, which could be mapped to serve all request URIs
of the form /dynamicWebApp/*.jsp

Now, when /dynamicWebApp/dnynamicFile.jsp is invoked, the JspInvoker looks
to see if a JSP called dynamicFile.jsp exists under that special folder.  If
it does, then your code translates/compiles/instantiates it (if not done
already) and the request is forwarded to it's doPost method.

I'm not saying this is easy, but it could be done.  You'd be reinventing the
classloading and service methods rather than all the other stuff.  You might
be forced to use SingleSignOn depending on your app, which could be a
negative.  Perhaps my answer is worse than yours ;)

If its any consolation, one of the annoyances I have encountered in the last
few months is that I have a particular webapp feature that I can't code well
because Java does not provide multiple inheritance.  I've done it, but the
code is ugly.  I've tried 99 ways of doing it different but don't have a
better one.  However, I realise that full multiple inheritance was
deliberately excluded from Java for specific reasons, so I have to decide
whether to stop using Java or accept it as good at what it is designed for.
And that's an easy choice to make :)

> -Original Message-
> From: Will Hartung [mailto:[EMAIL PROTECTED] 
> Sent: Friday 27 May 2005 20:38
> To: Tomcat Users List
> Subject: Re: Adding content/JSPs on the fly
> 
> 
> > From: "Steve Kirk" <[EMAIL PROTECTED]>
> > Sent: Friday, May 27, 2005 11:44 AM
> 
> > It sounds reasonable, but probably isn't tested or "by design", so
> probably
> > best to just have a go.  Re portability, the best advice I 
> can offer is an
> > old chestnut: read the servlet spec.  This is particularly 
> relevant in
> this
> > case.  The spec is generally pretty good at telling you you pretty
> > accurately if (a) what you want to do should/must be 
> supported or (b) what
> > you want do do is forbidden.  Of course there are some 
> areas that it does
> > not have a view either way on, but I find it to be an invaluable
> document -
> > I have it on shortcut from my taskbar and consult it often. 
>  It's at least
> > as useful as the javadocs or TC docs.
> >
> > For those of you that don't know where to find it, it's here, under
> > "specifications".
> > http://java.sun.com/products/servlet/reference/api/index.html
> >
> > Choose the servlet spec version appropriate to your TC version as
> described
> > in the table on the tomcat home page:
> > http://jakarta.apache.org/tomcat/index.html
> 
> I'm reasonably familiar with the specification. One of the 
> notable bits
> about it is simply the fact that within the spec, you're 
> pretty much not
> guaranteed writeable access to the file system at all (save 
> for a temporary
> area, and it's simply that -- temporary). But the reality is that most
> engines give you access to the disk that way.
> 
> > Just one more specific point on your note Will - I would 
> have thought if
> > anything that you want it to be a precondition that the 
> webapp NOT be
> > deployed as a war.  I've a feeling that if TC explodes the 
> war, then it
> > might not check the exploded FS for changes.  Don't take 
> this as gospel
> > though, this is a hazy half-remembered bit of info.
> 
> As far as I know, the Servlet spec doesn't have a deployment 
> method outside
> of a WAR. It's pretty much a container behavior to actually 
> explode the WAR
> on to the file system, yet, most obviously do for performance reasons.
> 
> But it does bring up a basic problem, for example, if by some 
> fluke the app
> is redeployed, all of tha

Re: Adding content/JSPs on the fly

2005-05-27 Thread Will Hartung
> From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
> Sent: Friday, May 27, 2005 1:04 PM

> Could you instead store the "JSP" in a database?

... snip ...

> Now, get the BLOB from the database based on that JSP name.  Convert the
> BLOB to a string and stick it in request, then forward to a JSP that is
> the following:
>
> <%=(String)request.getAttribute("theJSPContent")%>

If all I was interested in was displaying static data, then yes. But if I
wanted access to the actual templating ability of JSP, then that doesn't
help.

Look at it this way.

Let's say that I were using Velocity for templating instead of JSP. And
let's say I have a VelocityServlet to handle it, and some url is mapped, say
mywebapp/vt.

So, for the HomePage Velocity template, the URL would be:
http://host.com/mywebapp/vt/HomePage

The Servlet gets the request, strips off the HomePage, finds the HomePage
template file (or database record), fires up Velocity, renders it and spits
it out response.getOutputStream.

But here's the deal. I had to write the mapping code, the fetching code, the
rendering code (at least the call to the renderer), and the output code.
Velocity supports this, all well and good, it's not really a horrible
problem. The detail, though, is that I have essentially duplicated a large
chunk of what Tomcat and any compliant servlet container ALREADY provides. I
had to reinvent that wheel.

Doesn't that seem like a waste of time to you?

Now, clearly, Tomcat implements a JSPServlet. The Jasper project is simply
that. Identical pretty much to a VelocityServlet. I can tie *.vm to
VelocityServlet, and they work identically to JSPs in pretty much every way
and form. JSPs aren't anything special, in the big scheme of things (they
ARE more complicated, however).

So, if I wanted to provide the capability of dynamic JSPs (i.e. JSPs served
from some source other than the WAR and webapp, say a database or a file
outside of the hierarchy), I essentially have to "bundle" and refactor
Jasper into my webapp. When I deploy my webapp on to a stock Tomcat (or,
ideally, any other compliant container), the user now gets two copies of
Jasper -- the installed version and my version in the webapp.

Doesn't that seem redundant? It just seems like a painful hoop to jump
through.

I'd like to better leverage the container than how it will let me now,
essentially tap in to how it gets its resources, and I'd like that to be
possible through the Servlet API, via, say, a Resource Listener or somesuch
thing.

Regards,

Will Hartung
([EMAIL PROTECTED])


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



Re: Adding content/JSPs on the fly

2005-05-27 Thread Frank W. Zammetti

Could you instead store the "JSP" in a database?

Let's say you have a table with the following structure:

jsp_nameString
jsp_content BLOB

jsp_name is your primary key and is literally a JSP name.

Now, create a servlet filter that examines the path that was requested 
and pulls out the file name part... so the path might be 
"/my/app/page1.jsp", you just want the page.jsp part.


Now, get the BLOB from the database based on that JSP name.  Convert the 
BLOB to a string and stick it in request, then forward to a JSP that is 
the following:


<%=(String)request.getAttribute("theJSPContent")%>

And that's that.  You could create a screen specifically for uploading a 
JSP and storing it in the database.


Would something like this suite your needs?  I realize it's not as 
straight-forward as one might like, but it's not too bad either.


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Will Hartung wrote:

From: "Steve Kirk" <[EMAIL PROTECTED]>
Sent: Friday, May 27, 2005 11:44 AM




It sounds reasonable, but probably isn't tested or "by design", so


probably


best to just have a go.  Re portability, the best advice I can offer is an
old chestnut: read the servlet spec.  This is particularly relevant in


this


case.  The spec is generally pretty good at telling you you pretty
accurately if (a) what you want to do should/must be supported or (b) what
you want do do is forbidden.  Of course there are some areas that it does
not have a view either way on, but I find it to be an invaluable


document -


I have it on shortcut from my taskbar and consult it often.  It's at least
as useful as the javadocs or TC docs.

For those of you that don't know where to find it, it's here, under
"specifications".
http://java.sun.com/products/servlet/reference/api/index.html

Choose the servlet spec version appropriate to your TC version as


described


in the table on the tomcat home page:
http://jakarta.apache.org/tomcat/index.html



I'm reasonably familiar with the specification. One of the notable bits
about it is simply the fact that within the spec, you're pretty much not
guaranteed writeable access to the file system at all (save for a temporary
area, and it's simply that -- temporary). But the reality is that most
engines give you access to the disk that way.



Just one more specific point on your note Will - I would have thought if
anything that you want it to be a precondition that the webapp NOT be
deployed as a war.  I've a feeling that if TC explodes the war, then it
might not check the exploded FS for changes.  Don't take this as gospel
though, this is a hazy half-remembered bit of info.



As far as I know, the Servlet spec doesn't have a deployment method outside
of a WAR. It's pretty much a container behavior to actually explode the WAR
on to the file system, yet, most obviously do for performance reasons.

But it does bring up a basic problem, for example, if by some fluke the app
is redeployed, all of that new data is blasted away by the WAR..that would
be Bad.

But I can't see another (easy) way to create JSPs on the fly, or in fact to
create any other content that can be served directly the server.

It's an annoying nit of the spec, to me, that it doesn't expose this
behavior to the developer. For example, unlike EJBs (which has a specified
limitation on accessing the disk), the Servlet spec does allow you to access
the disk, though perhaps not within the WAR hierarchy. But, there is no way
to, say, "forward" to a static resource that the server can then handle in
its own "internally optimal" way. Rather, I have to open the static
resource, determine the content type (I can get that from the Servlet spec),
and then feed it into the output stream, when in fact it would simply be
easier to do "req.serveStatic("/tmp/mynewgraphic.gif")" or some such thing,
or be able to forward outside of the web app (i.e. to a actual file rather
than a URL).

Simply, the application structure and such are pretty much isolated from the
developer. I can't add anything dynamically to the security domain, for
example, which means if I want that kind of capability in my application, I
have to essentially implement ALL of the container security -- mapping, role
checks, etc. Container security is an all or nothing. Be happy with its
limited funcitonality or dump it entirely.

So, now if I want dynamic templating in my Webapp, I, technically, have to
dump JSP completely and switch to something like Velocity. All of the power
of JSP, tag libraries, etc. is gone. I imagine that I could mimic the JSP
environment, compile the JSP myself, compile the java myself, load the class
myself and feed the output into the standard output stream, but that seems
like a 

Re: Adding content/JSPs on the fly

2005-05-27 Thread Will Hartung
> From: "Steve Kirk" <[EMAIL PROTECTED]>
> Sent: Friday, May 27, 2005 11:44 AM

> It sounds reasonable, but probably isn't tested or "by design", so
probably
> best to just have a go.  Re portability, the best advice I can offer is an
> old chestnut: read the servlet spec.  This is particularly relevant in
this
> case.  The spec is generally pretty good at telling you you pretty
> accurately if (a) what you want to do should/must be supported or (b) what
> you want do do is forbidden.  Of course there are some areas that it does
> not have a view either way on, but I find it to be an invaluable
document -
> I have it on shortcut from my taskbar and consult it often.  It's at least
> as useful as the javadocs or TC docs.
>
> For those of you that don't know where to find it, it's here, under
> "specifications".
> http://java.sun.com/products/servlet/reference/api/index.html
>
> Choose the servlet spec version appropriate to your TC version as
described
> in the table on the tomcat home page:
> http://jakarta.apache.org/tomcat/index.html

I'm reasonably familiar with the specification. One of the notable bits
about it is simply the fact that within the spec, you're pretty much not
guaranteed writeable access to the file system at all (save for a temporary
area, and it's simply that -- temporary). But the reality is that most
engines give you access to the disk that way.

> Just one more specific point on your note Will - I would have thought if
> anything that you want it to be a precondition that the webapp NOT be
> deployed as a war.  I've a feeling that if TC explodes the war, then it
> might not check the exploded FS for changes.  Don't take this as gospel
> though, this is a hazy half-remembered bit of info.

As far as I know, the Servlet spec doesn't have a deployment method outside
of a WAR. It's pretty much a container behavior to actually explode the WAR
on to the file system, yet, most obviously do for performance reasons.

But it does bring up a basic problem, for example, if by some fluke the app
is redeployed, all of that new data is blasted away by the WAR..that would
be Bad.

But I can't see another (easy) way to create JSPs on the fly, or in fact to
create any other content that can be served directly the server.

It's an annoying nit of the spec, to me, that it doesn't expose this
behavior to the developer. For example, unlike EJBs (which has a specified
limitation on accessing the disk), the Servlet spec does allow you to access
the disk, though perhaps not within the WAR hierarchy. But, there is no way
to, say, "forward" to a static resource that the server can then handle in
its own "internally optimal" way. Rather, I have to open the static
resource, determine the content type (I can get that from the Servlet spec),
and then feed it into the output stream, when in fact it would simply be
easier to do "req.serveStatic("/tmp/mynewgraphic.gif")" or some such thing,
or be able to forward outside of the web app (i.e. to a actual file rather
than a URL).

Simply, the application structure and such are pretty much isolated from the
developer. I can't add anything dynamically to the security domain, for
example, which means if I want that kind of capability in my application, I
have to essentially implement ALL of the container security -- mapping, role
checks, etc. Container security is an all or nothing. Be happy with its
limited funcitonality or dump it entirely.

So, now if I want dynamic templating in my Webapp, I, technically, have to
dump JSP completely and switch to something like Velocity. All of the power
of JSP, tag libraries, etc. is gone. I imagine that I could mimic the JSP
environment, compile the JSP myself, compile the java myself, load the class
myself and feed the output into the standard output stream, but that seems
like a silly wheel to reinvent when I have a full container here that DOES
THAT ALREADY, doncha think?

Mind, I may still just Do It, open up paths to the disk and plonk files and
JSPs in place and see what happens, but it's a flaming hoop I wish I didn't
have to jump through.

Regards,

Will Hartung
([EMAIL PROTECTED])


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



[OT]: Adding content/JSPs on the fly: file.separtor

2005-05-27 Thread egan0019
When building file path strings, should one always use the
System.getProperty("file.separator") return value?  Is this to
differentiate between Windows("\") and unix/linux/solaris("/" separators? 
I haven't seen that property before.

And, are there any other things I should know about to make my file system
accessing code portable?

Yes, I am new to java.

On 27 May 2005, Will Hartung wrote:
> I'm scheming on a little project, and one of the things I want to be able
to
> do is simply add content to the application.
> 
> The typical way to add content is also rather static -- add it to the WAR
> and redeploy.
> 
> That's not particularly dynamic tho, and doesn't really facilitate
changing
> content from the web app.
> 
> One of the things I'd like to be able to create on the fly are JSPs that
are
> then served by the container.
> 
> Now, Kenneth Jensen may have answered my question for me by providing
this
> snippet:
> 
> ServletContext context = getServletConfig().getServletContext();
> String slash = System.getProperty("file.separator");
> keystore = context.getRealPath("/") + "WEB-INF" + slash +
> getInitParameter("keystorefile");
> 
> The key being the "getRealPath("/")" code.
> 
> So, my question is do you think that it's reasonable and fairly portable
to
> leverage that technique to find where on the system a webapp is deployed
and
> use that as a base path to create new resources to be served by the
> container?
> 
> I'm aware that it is possible for a web app to be deployed in an
unexploded
> WAR, and I would simply make it a precondition that this not be the case
> (and for 99% of most systems, it simply isn't an issue).
> 
> But, shouldn't this pretty much work with most common servlet containers?
> 
> Thanx for any insight...
> 
> Regards,
> 
> Will Hartung
> ([EMAIL PROTECTED])
> 
> 
> -
> 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: Adding content/JSPs on the fly

2005-05-27 Thread Steve Kirk

It sounds reasonable, but probably isn't tested or "by design", so probably
best to just have a go.  Re portability, the best advice I can offer is an
old chestnut: read the servlet spec.  This is particularly relevant in this
case.  The spec is generally pretty good at telling you you pretty
accurately if (a) what you want to do should/must be supported or (b) what
you want do do is forbidden.  Of course there are some areas that it does
not have a view either way on, but I find it to be an invaluable document -
I have it on shortcut from my taskbar and consult it often.  It's at least
as useful as the javadocs or TC docs.

For those of you that don't know where to find it, it's here, under
"specifications".  
http://java.sun.com/products/servlet/reference/api/index.html 

Choose the servlet spec version appropriate to your TC version as described
in the table on the tomcat home page: 
http://jakarta.apache.org/tomcat/index.html

Just one more specific point on your note Will - I would have thought if
anything that you want it to be a precondition that the webapp NOT be
deployed as a war.  I've a feeling that if TC explodes the war, then it
might not check the exploded FS for changes.  Don't take this as gospel
though, this is a hazy half-remembered bit of info.

> -Original Message-
> From: Will Hartung [mailto:[EMAIL PROTECTED] 
> Sent: Friday 27 May 2005 18:31
> To: Tomcat Users List
> Subject: Adding content/JSPs on the fly
> 
> 
> I'm scheming on a little project, and one of the things I 
> want to be able to
> do is simply add content to the application.
> 
> The typical way to add content is also rather static -- add 
> it to the WAR
> and redeploy.
> 
> That's not particularly dynamic tho, and doesn't really 
> facilitate changing
> content from the web app.
> 
> One of the things I'd like to be able to create on the fly 
> are JSPs that are
> then served by the container.
> 
> Now, Kenneth Jensen may have answered my question for me by 
> providing this
> snippet:
> 
> ServletContext context = getServletConfig().getServletContext();
> String slash = System.getProperty("file.separator");
> keystore = context.getRealPath("/") + "WEB-INF" + slash +
> getInitParameter("keystorefile");
> 
> The key being the "getRealPath("/")" code.
> 
> So, my question is do you think that it's reasonable and 
> fairly portable to
> leverage that technique to find where on the system a webapp 
> is deployed and
> use that as a base path to create new resources to be served by the
> container?
> 
> I'm aware that it is possible for a web app to be deployed in 
> an unexploded
> WAR, and I would simply make it a precondition that this not 
> be the case
> (and for 99% of most systems, it simply isn't an issue).
> 
> But, shouldn't this pretty much work with most common servlet 
> containers?
> 
> Thanx for any insight...
> 
> Regards,
> 
> Will Hartung
> ([EMAIL PROTECTED])
> 
> 
> -
> 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]



Adding content/JSPs on the fly

2005-05-27 Thread Will Hartung
I'm scheming on a little project, and one of the things I want to be able to
do is simply add content to the application.

The typical way to add content is also rather static -- add it to the WAR
and redeploy.

That's not particularly dynamic tho, and doesn't really facilitate changing
content from the web app.

One of the things I'd like to be able to create on the fly are JSPs that are
then served by the container.

Now, Kenneth Jensen may have answered my question for me by providing this
snippet:

ServletContext context = getServletConfig().getServletContext();
String slash = System.getProperty("file.separator");
keystore = context.getRealPath("/") + "WEB-INF" + slash +
getInitParameter("keystorefile");

The key being the "getRealPath("/")" code.

So, my question is do you think that it's reasonable and fairly portable to
leverage that technique to find where on the system a webapp is deployed and
use that as a base path to create new resources to be served by the
container?

I'm aware that it is possible for a web app to be deployed in an unexploded
WAR, and I would simply make it a precondition that this not be the case
(and for 99% of most systems, it simply isn't an issue).

But, shouldn't this pretty much work with most common servlet containers?

Thanx for any insight...

Regards,

Will Hartung
([EMAIL PROTECTED])


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



Re: Problem with precompiled JSPs

2005-05-26 Thread Mike Baliel

Hello again,

Is anyone using precompiled JSP's in a similar way or have knowledge of 
others using precompiled JSP's in Tomacat that is similar to the usage 
below?


Any response is welcomed... ;-)


Mike Baliel wrote:

Hello,

I have an application that is currently running under JBoss 3.2.x 
with Jetty that I would like to get running on Tomcat 5.X.  I have 
precompiled all of the JSP's and mapped them to there respective JSP 
path in the web.xml.  Here is a sample fragment of the web.xml:




2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>


mjc_campus_tour

tourArea0
tourArea0

com.atomogy.virtualtour.view.pages.tourArea0_jsp 




tourArea1
tourArea1

com.atomogy.virtualtour.view.pages.tourArea1_jsp 




tourArea2
tourArea2

com.atomogy.virtualtour.view.pages.tourArea2_jsp 




tourArea3
tourArea3

com.atomogy.virtualtour.view.pages.tourArea3_jsp 




footer
footer

com.atomogy.virtualtour.view.include.footer_jsp 




header
header

com.atomogy.virtualtour.view.include.header_jsp 




tourArea0
/pages/tourArea0.jsp


tourArea1
/pages/tourArea1.jsp


tourArea2
/pages/tourArea2.jsp


tourArea3
/pages/tourArea3.jsp

 
footer
/include/footer.jsp


header
/include/header.jsp


index.jsp




The error message that I get when trying to run the application on 
Tomcat is as follows:



2005-05-26 09:33:03 StandardWrapperValve[tourArea0]: Servlet.service() 
for servlet tourArea0 threw exception
java.lang.NoSuchMethodError: 
org.apache.jasper.runtime.JspRuntimeLibrary.include(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljavax/servlet/jsp/JspWriter;Z)V 

at 
com.atomogy.virtualtour.view.pages.tourArea0_jsp._jspService(tourArea0_jsp.java:43) 


at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 

at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 

at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) 

at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 

at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) 

at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) 

at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 

at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) 

at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 

at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) 

at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) 

at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 

at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 

at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) 

at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 


at java.lang.Thread.run(Thread.java:534)


Tomcat appears to be choking on the JSP includes.   I have traversed 
all of the "Jasper" related jars and the method 
(org.apache.jasper.runtime.JspRuntimeLibrary.include) definitely exists. 
 I have also made sure that the JspC that I am using to compile the 
JSP's is indeed the JspC located at 
[TOMCAT_HOME\common\lib\jasper-compiler.jar].


Any insight into this problem would be greatly appreciated.

Thanks,




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.17 - Release Date: 5/25/2005


-
To u

Problem with precompiled JSPs

2005-05-26 Thread Mike Baliel

Hello,

I have an application that is currently running under JBoss 3.2.x 
with Jetty that I would like to get running on Tomcat 5.X.  I have 
precompiled all of the JSP's and mapped them to there respective JSP 
path in the web.xml.  Here is a sample fragment of the web.xml:




2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>


mjc_campus_tour

tourArea0
tourArea0

com.atomogy.virtualtour.view.pages.tourArea0_jsp


tourArea1
tourArea1

com.atomogy.virtualtour.view.pages.tourArea1_jsp


tourArea2
tourArea2

com.atomogy.virtualtour.view.pages.tourArea2_jsp


tourArea3
tourArea3

com.atomogy.virtualtour.view.pages.tourArea3_jsp


footer
footer

com.atomogy.virtualtour.view.include.footer_jsp


header
header

com.atomogy.virtualtour.view.include.header_jsp


tourArea0
/pages/tourArea0.jsp


tourArea1
/pages/tourArea1.jsp


tourArea2
/pages/tourArea2.jsp


tourArea3
/pages/tourArea3.jsp

 
footer
/include/footer.jsp


header
/include/header.jsp


index.jsp




The error message that I get when trying to run the application on 
Tomcat is as follows:



2005-05-26 09:33:03 StandardWrapperValve[tourArea0]: Servlet.service() 
for servlet tourArea0 threw exception
java.lang.NoSuchMethodError: 
org.apache.jasper.runtime.JspRuntimeLibrary.include(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljavax/servlet/jsp/JspWriter;Z)V
at 
com.atomogy.virtualtour.view.pages.tourArea0_jsp._jspService(tourArea0_jsp.java:43)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:534)


Tomcat appears to be choking on the JSP includes.   I have traversed 
all of the "Jasper" related jars and the method 
(org.apache.jasper.runtime.JspRuntimeLibrary.include) definitely exists. 
 I have also made sure that the JspC that I am using to compile the 
JSP's is indeed the JspC located at 
[TOMCAT_HOME\common\lib\jasper-compiler.jar].


Any insight into this problem would be greatly appreciated.

Thanks,

--


Mike Baliel
President / CEO
*Atomogy Corporation*

"Lean, Friendly, Responsive and Smart"
Cell 209.484.6292
Desk 209.523.0033 x215
www.atomogy.com 




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.17 - Release Date: 5/25/2005


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



Re: how to access JSPs using servername/~username

2005-05-13 Thread Tim Funk
No, see http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html
There is a feature that allows you to set context configuration inside a WAR 
file. [by creating a META-INF/context.xml file. ] Whether this would work 
with userdirs too , I don't know (and have not tested)

-Tim
Nikola Milutinovic wrote:
Tim Funk wrote:
~user/public_html/META-INF/context.xml might do the trick.

So, the magical name of the UserDir context is "context"?

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


Re: how to access JSPs using servername/~username

2005-05-12 Thread Nikola Milutinovic
Tim Funk wrote:
~user/public_html/META-INF/context.xml might do the trick.

So, the magical name of the UserDir context is "context"?
Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to access JSPs using servername/~username

2005-05-12 Thread Tim Funk
~user/public_html/META-INF/context.xml might do the trick.
-Tim
Nikola Milutinovic wrote:
Tim Funk wrote:
There is the concept of user dirs ...
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
See the section "User Web Applications"

I stand corrected.
I still prefer explicit context mappings. How would you deploy JNDI 
resources in userdir case?
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to access JSPs using servername/~username

2005-05-12 Thread Nikola Milutinovic
Tim Funk wrote:
There is the concept of user dirs ...
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
See the section "User Web Applications"

I stand corrected.
I still prefer explicit context mappings. How would you deploy JNDI 
resources in userdir case?

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


Re: how to access JSPs using servername/~username

2005-05-12 Thread Tim Funk
There is the concept of user dirs ...
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
See the section "User Web Applications"
-Tim
Nikola Milutinovic wrote:
Akhthar Parvez. K wrote:
Hi,
I used to access the html webpages using 
servername.(http://servername/~username)
But I am not able to access JSPs in the above fashion. What could be 
added into server.xml
so that I can access jsps using servername.(http://servername/~username)
 

There is no ellegant solution, like in Apache HTTPD ("UserDir" directive).
Firstly, Tomcat doesn't really care about users on the system or their 
home directories. Secondly, it deals with Web Applications, known as 
"Contexts", rather than directories. Sure, you can keep your JSPs in a 
directory, but they can also be in a WAR file.

So, with Tomcat there is no UserDir concept.
What I usually do, is "one VHost - one user account" and then create 
"webapps" dir for TC web applications.

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


RE: how to access JSPs using servername/~username

2005-05-12 Thread Raghupathy,Gurumoorthy
No this is not true 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html

Its says ... 


==
Many web servers can automatically map a request URI starting with a tilde
character ("~") and a username to a directory (commonly named public_html)
in that user's home directory on the server. You can accomplish the same
thing in Catalina by using a special Listener element like this (on a Unix
system that uses the /etc/passwd file to identify valid users):

   
 
  ...
  
  ...


  
   

On a server where /etc/passwd is not in use, you can request Catalina to
consider all directories found in a specified base directory (such as
c:\Homes in this example) to be considered "user home" directories for the
purposes of this directive:

   
 
  ...
  
  ...


  
   

If a user home directory has been set up for a user named craigmcc, then its
contents will be visible from a client browser by making a request to a URL
like:

   
 http://www.mycompany.com:8080/~craigmcc


==

  
   


-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 12:47
To: Tomcat Users List
Subject: Re: how to access JSPs using servername/~username


Akhthar Parvez. K wrote:

>Hi,
>
>I used to access the html webpages using
servername.(http://servername/~username)
>But I am not able to access JSPs in the above fashion. What could be added
into server.xml
>so that I can access jsps using servername.(http://servername/~username)
>  
>

There is no ellegant solution, like in Apache HTTPD ("UserDir" directive).

Firstly, Tomcat doesn't really care about users on the system or their 
home directories. Secondly, it deals with Web Applications, known as 
"Contexts", rather than directories. Sure, you can keep your JSPs in a 
directory, but they can also be in a WAR file.

So, with Tomcat there is no UserDir concept.

What I usually do, is "one VHost - one user account" and then create 
"webapps" dir for TC web applications.

Nix.

-
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: how to access JSPs using servername/~username

2005-05-12 Thread Nikola Milutinovic
Akhthar Parvez. K wrote:
Hi,
I used to access the html webpages using servername.(http://servername/~username)
But I am not able to access JSPs in the above fashion. What could be added into server.xml
so that I can access jsps using servername.(http://servername/~username)
 

There is no ellegant solution, like in Apache HTTPD ("UserDir" directive).
Firstly, Tomcat doesn't really care about users on the system or their 
home directories. Secondly, it deals with Web Applications, known as 
"Contexts", rather than directories. Sure, you can keep your JSPs in a 
directory, but they can also be in a WAR file.

So, with Tomcat there is no UserDir concept.
What I usually do, is "one VHost - one user account" and then create 
"webapps" dir for TC web applications.

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


how to access JSPs using servername/~username

2005-05-12 Thread Akhthar Parvez. K
Hi,

I used to access the html webpages using 
servername.(http://servername/~username)
But I am not able to access JSPs in the above fashion. What could be added into 
server.xml
so that I can access jsps using servername.(http://servername/~username)

-- 
With Regards,

Akhthar

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



Please correct docs - Compile JSPs w/ JDK 1.5

2005-05-06 Thread Milo Grains

Please correct the documentation to reflect that this does not work. It would 
save a lot of time and lots of emails here about the same issue. 

Thanks, Milo
-- 
___
Get your free email from http://www.dellmail.com




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



Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5

2005-05-06 Thread Milo Grains

It is not possible.  I have asked here for months and nothing has worked.  The 
compiler flags than the docs say to use are not passed to the compiler, so you 
can not use Ant as the docs say.  I think it is an IBM conspiricy.  It took IBM 
a year to implement inner classes back in the jdk 1.1 era, so I suspect it will 
take the same time before that IBM compiler supports Java 5 features.  Netbeans 
will comile them in the IDE with Java 5, but Tomcat won't compile them with 
Java 5.


- Original Message -
From: "Stefan Parnet" <[EMAIL PROTECTED]>
To: tomcat-user@jakarta.apache.org
Subject: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Date: Wed, 27 Apr 2005 15:20:32 +0200

> 
> Hello,
> 
> I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since 
> Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot 
> compile my JSPs.
> So I want the tomcat to compile the JSP's with the Sun JDK 1.5 
> compiler. I searched the web, but I did not find any instructions 
> how to configure the tomcat to do so.
> 
> Can anyone help me?
> 
> Thanks
> 
> Stefan
> 
> 
> 
> 
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. Access to this e-mail by anyone else is unauthorised.
> If you are not the intended recipient, any disclosure, copying,
> distribution or any action taken or omitted to be taken in reliance on
> it, is prohibited.
> E-mail messages are not necessarily secure.  Renesas does not accept
> responsibility for any changes made to this message after it was sent.
> Please note that this email message has been swept by Renesas for
> the presence of computer viruses.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
___
Get your free email from http://www.dellmail.com




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



RE: Howto configure tomcat to compile JSPs with Sun JDK 1.5

2005-04-28 Thread Steiner, Stephan
Hi

>Did you have a look at the how-to, which I mentioned yesterday? And if yes,
why didn't >it solve your problem?

>-> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html

It works..  But there's a problem with 

compilerSourceVM - What JDK version are the source files compatible with?
(Default JDK 1.4) 
compilerTargetVM - What JDK version are the generated files compatible with?
(Default JDK 1.4) 

If you set those, you'll get a "resource unavailable" message for every page
you try to access (regardless whether you set this to 1.4 or 1.5).

I believe it has been fixed in the CSV since (I haven't found time to
compile Tomcat on my own and try), and I didn't find anything about this in
the 5.5.9 changelog.

Regards
Stephan

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



Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5

2005-04-28 Thread Lutz Zetzsche
Hi Stefan,

Am Donnerstag, 28. April 2005 09:07 schrieb Stefan Parnet:
> The problem is:
> 1. Tomcat 5.5 (without compatibility packages) runs only with Java
> 1.5 (JRE!)
> 2. The built in Java compiler to compile JSPs (and only JSPs) is the
> Eclipse JDT Compiler !!! JAVA 1.4 !!!
>
> ==> So Servlets using Java 1.5 features are runnig without problems
> because they are already compiled
> ==> JSPs with Java 1.5 features cannot be compiled (within tomcat)
> because the tomcat built-in compiler only knows Java 1.4

Did you have a look at the how-to, which I mentioned yesterday? And if 
yes, why didn't it solve your problem?

-> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html


Best wishes
Lutz

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



Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5

2005-04-28 Thread Stefan Parnet
Hello Jean-Claude,
I don't use the Eclipse IDE. I do all my developments with the NetBeans IDE.
But anyway, the IDE does not matter since Tomcat is running separately 
in an productive environment under Linux with Apache, mod_jk and Java 1.5_02

Tomcat 5.5 just uses Eclipse JDT compiler classes to compile JSPs. But 
it should be possible to change the config, so that Tomcat uses another 
compiler. At least, the releasenotes say so.
But there is no useful howto at the tomcat web site or anywhere else. 
(at least I didn't find one)

The problem is:
1. Tomcat 5.5 (without compatibility packages) runs only with Java 1.5 
(JRE!)
2. The built in Java compiler to compile JSPs (and only JSPs) is the 
Eclipse JDT Compiler !!! JAVA 1.4 !!!

==> So Servlets using Java 1.5 features are runnig without problems 
because they are already compiled
==> JSPs with Java 1.5 features cannot be compiled (within tomcat) 
because the tomcat built-in compiler only knows Java 1.4

Stefan
Serlet Jean-Claude schrieb:
Hello 

Lutz is right : you may define your JRE under Eclipse
Under (sorry for my mistakes : i use a french version and try to translate
in english) Window -> Preferences -> Installed JRE you may use an other JRE
that the one installed under Eclipse
Hope this will help you
Jean-Claude
-Message d'origine-
De : Stefan Parnet [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 27 avril 2005 16:14
À : Tomcat Users List
Objet : Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5

Lutz Zetzsche schrieb:
 

Hi Stefan,
Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet:
   

Hello,
I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since
Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot
compile my JSPs.
So I want the tomcat to compile the JSP's with the Sun JDK 1.5
compiler. I searched the web, but I did not find any instructions how
to configure the tomcat to do so.
Can anyone help me?
  

 

Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it 
seperately?

If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse 
which installed Tomcat and which installed JDK to use for your project. 
This is the way, I can do it with NetBeans IDE.

Else, if you run Tomcat independently of the IDE, you must only set the 
environment variable for the JDK correctly before starting the server. 
I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the 
environment variable JRE_HOME so that Tomcat uses the right one of the 
installed JDKs. I set the JRE_HOME manually before starting Tomcat:

export JRE_HOME=/usr/java/jre1.5.0_02/
(you must change the path to the path you use on your system)
The environment variable JAVA_HOME could also play a role, although not 
in my case. :-)

I hope, this information does help a little.
Best wishes
Lutz
   



This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited.
E-mail messages are not necessarily secure.  Renesas does not accept
responsibility for any changes made to this message after it was sent.
Please note that this email message has been swept by Renesas for
the presence of computer viruses.

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


RE: Howto configure tomcat to compile JSPs with Sun JDK 1.5

2005-04-27 Thread Serlet Jean-Claude
Hello 

Lutz is right : you may define your JRE under Eclipse
Under (sorry for my mistakes : i use a french version and try to translate
in english) Window -> Preferences -> Installed JRE you may use an other JRE
that the one installed under Eclipse
Hope this will help you

Jean-Claude

-Message d'origine-
De : Stefan Parnet [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 27 avril 2005 16:14
À : Tomcat Users List
Objet : Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5




Lutz Zetzsche schrieb:

>Hi Stefan,
>
>Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet:
>  
>
>>Hello,
>>
>>I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since
>>Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot
>>compile my JSPs.
>>So I want the tomcat to compile the JSP's with the Sun JDK 1.5
>>compiler. I searched the web, but I did not find any instructions how
>>to configure the tomcat to do so.
>>
>>Can anyone help me?
>>
>>
>
>Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it 
>seperately?
>
>If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse 
>which installed Tomcat and which installed JDK to use for your project. 
>This is the way, I can do it with NetBeans IDE.
>
>Else, if you run Tomcat independently of the IDE, you must only set the 
>environment variable for the JDK correctly before starting the server. 
>I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the 
>environment variable JRE_HOME so that Tomcat uses the right one of the 
>installed JDKs. I set the JRE_HOME manually before starting Tomcat:
>
>   export JRE_HOME=/usr/java/jre1.5.0_02/
>   (you must change the path to the path you use on your system)
>
>The environment variable JAVA_HOME could also play a role, although not 
>in my case. :-)
>
>I hope, this information does help a little.
>
>
>Best wishes
>
>Lutz
>
I have the environment variables JAVA_HOME and JRE_HOME already set to 
the JDK, but Tomcat still compiles JSPs with its built in  Eclipse JDT 
Java compiler.
This fact is mentioned in the Release Notes. There is also mentioned 
that it is possible to configure Tomcat to use another compiler. But 
there is no explanation how to configure it.

Thanks for your answer.

Stefan



This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited.
E-mail messages are not necessarily secure.  Renesas does not accept
responsibility for any changes made to this message after it was sent.
Please note that this email message has been swept by Renesas for
the presence of computer viruses.



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



Re: JSPs slow to compile?

2005-04-27 Thread Bud Bach
Hummm...  Just changed the jasper init parameter "development" to false 
in conf/web.xml and now pages load in a couple of seconds or less.  Why 
the "huge" difference?  Any tips to make it even faster?

-- Bud

Bud Bach wrote:
I am running Liferay Portal Pro 3.3 under tomcat 5.5.9 on fedora fc3 
running on a 1.2ghz p4 w/ 3gb ram.  Initial page loads are taking on 
the order of 30 seconds.  After the initial page load, it takes just a 
second to reload.  30 seconds seems like a long time to initially 
compile the page and load it.  Do I potentially have something 
misconfigured?
Also, I've tried to precompile the pages with the script in the docs 
on the tomcat website but the script fails with a 
NullPointerException.  Has anyone else successfully precompiled JSPs 
under 5.5 with the script on this page:

 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html
?  Thanks.  -- Bud
-
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]


JSPs slow to compile?

2005-04-27 Thread Bud Bach
I am running Liferay Portal Pro 3.3 under tomcat 5.5.9 on fedora fc3 
running on a 1.2ghz p4 w/ 3gb ram.  Initial page loads are taking on the 
order of 30 seconds.  After the initial page load, it takes just a 
second to reload.  30 seconds seems like a long time to initially 
compile the page and load it.  Do I potentially have something 
misconfigured? 

Also, I've tried to precompile the pages with the script in the docs on 
the tomcat website but the script fails with a NullPointerException.  
Has anyone else successfully precompiled JSPs under 5.5 with the script 
on this page:

 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html
?  Thanks.  -- Bud
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5

2005-04-27 Thread Lutz Zetzsche
Hi Stefan,

Am Mittwoch, 27. April 2005 16:14 schrieb Stefan Parnet:
> I have the environment variables JAVA_HOME and JRE_HOME already set
> to the JDK, but Tomcat still compiles JSPs with its built in  Eclipse
> JDT Java compiler.
> This fact is mentioned in the Release Notes. There is also mentioned
> that it is possible to configure Tomcat to use another compiler. But
> there is no explanation how to configure it.

Perhaps the following how-to contains the information, you missed in the 
release notes:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html

Best wishes
Lutz

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



Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5

2005-04-27 Thread Stefan Parnet

Lutz Zetzsche schrieb:
Hi Stefan,
Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet:
 

Hello,
I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since
Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot
compile my JSPs.
So I want the tomcat to compile the JSP's with the Sun JDK 1.5
compiler. I searched the web, but I did not find any instructions how
to configure the tomcat to do so.
Can anyone help me?
   

Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it 
seperately?

If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse 
which installed Tomcat and which installed JDK to use for your project. 
This is the way, I can do it with NetBeans IDE.

Else, if you run Tomcat independently of the IDE, you must only set the 
environment variable for the JDK correctly before starting the server. 
I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the 
environment variable JRE_HOME so that Tomcat uses the right one of the 
installed JDKs. I set the JRE_HOME manually before starting Tomcat:

export JRE_HOME=/usr/java/jre1.5.0_02/
(you must change the path to the path you use on your system)
The environment variable JAVA_HOME could also play a role, although not 
in my case. :-)

I hope, this information does help a little.
Best wishes
Lutz
I have the environment variables JAVA_HOME and JRE_HOME already set to 
the JDK, but Tomcat still compiles JSPs with its built in  Eclipse JDT 
Java compiler.
This fact is mentioned in the Release Notes. There is also mentioned 
that it is possible to configure Tomcat to use another compiler. But 
there is no explanation how to configure it.

Thanks for your answer.
Stefan

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited.
E-mail messages are not necessarily secure.  Renesas does not accept
responsibility for any changes made to this message after it was sent.
Please note that this email message has been swept by Renesas for
the presence of computer viruses.

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


Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5

2005-04-27 Thread Lutz Zetzsche
Hi Stefan,

Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet:
> Hello,
>
> I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since
> Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot
> compile my JSPs.
> So I want the tomcat to compile the JSP's with the Sun JDK 1.5
> compiler. I searched the web, but I did not find any instructions how
> to configure the tomcat to do so.
>
> Can anyone help me?

Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it 
seperately?

If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse 
which installed Tomcat and which installed JDK to use for your project. 
This is the way, I can do it with NetBeans IDE.

Else, if you run Tomcat independently of the IDE, you must only set the 
environment variable for the JDK correctly before starting the server. 
I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the 
environment variable JRE_HOME so that Tomcat uses the right one of the 
installed JDKs. I set the JRE_HOME manually before starting Tomcat:

export JRE_HOME=/usr/java/jre1.5.0_02/
(you must change the path to the path you use on your system)

The environment variable JAVA_HOME could also play a role, although not 
in my case. :-)

I hope, this information does help a little.


Best wishes

Lutz

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



Precompiling JSPs fails

2005-04-27 Thread Bud Bach
Hi, I’m using Tomcat 5.5.9 and JDK 1.5.0_02.  I’m trying to precompile the
Liferay Pro Portal 3.2 JSPs using the ant build script found on the apache
web site:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html#Web%20Appl
ication%20Compilation

modified to add jars placed in common/lib/ext.  JAVA_HOME is set to
/usr/java/jdk1.5.0_02.

When I run the ant script, I get a NullPointerException.  Below is the
script I am using and the output from the ant command.  Any idea what I
might be doing wrong?

Thanks.  -- Bud




 

   
     
       
       
         
       
       
         
       
       
         
       
       
         
       
     
   

   

 

 

   
   

   
     
       
       
         
       
       
       
         
       
   
 
   
       
       
         
       
       
         
       
     
     
     
   

 

 
 



---

#ant -v -Dtomcat.home=/usr/local/tomcat/jakarta-tomcat-5.5.9
-Dwebapp.path=/usr/local/tomcat/jakarta-tomcat-5.5.9/webapps/liferay
Apache Ant version 1.6.2 compiled on July 16 2004
Buildfile: build.xml
Detected Java version: 1.5 in: /usr/java/jdk1.5.0_02/jre
Detected OS: Linux
parsing buildfile /usr/local/tomcat/jakarta-tomcat-5.5.9/bin/build.xml with
URI = file:///usr/local/tomcat/jakarta-tomcat-5.5.9/bin/build.xml
Project base dir set to: /usr/local/tomcat/jakarta-tomcat-5.5.9/bin
Build sequence for target `all' is [jspc, compile, all]
Complete build sequence is [jspc, compile, all, ]

jspc:
 [jasper2] java.lang.NullPointerException
 [jasper2] at
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext
.java:220)
 [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:849)
 [jasper2] at org.apache.jasper.JspC.execute(JspC.java:991)
 [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 [jasper2] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 [jasper2] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 [jasper2] at java.lang.reflect.Method.invoke(Method.java:585)
 [jasper2] at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
 [jasper2] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
 [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364)
 [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341)
 [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369)
 [jasper2] at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
 [jasper2] at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
 [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:673)
 [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:188)
 [jasper2] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
 [jasper2] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
 [jasper2] Error in class org.apache.jasper.JspC

BUILD FAILED
/usr/local/tomcat/jakarta-tomcat-5.5.9/bin/build.xml:27:
org.apache.jasper.JasperException
   at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:131)
   at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.tools.ant.Target.execute(Target.java:341)
   at org.apache.tools.ant.Target.performTasks(Target.java:369)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
   at org.apache.tools.ant.Main.runBuild(Main.java:673)
   at org.apache.tools.ant.Main.startAnt(Main.java:188)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: org.apache.jasper.JasperException
   at org.apache.jasper.JspC.processFile(JspC.java:883)
   at org.apache.jasper.JspC.execute(JspC.java:991)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
   ... 10 more
--- Nested Exception ---
org.apache.jasper.JasperException
   at org.apache.jasper.JspC.processFile(JspC.java:883)
   at org.apache.jasper.JspC.execute(JspC.java:991)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter

Howto configure tomcat to compile JSPs with Sun JDK 1.5

2005-04-27 Thread Stefan Parnet
Hello,
I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since 
Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile 
my JSPs.
So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. 
I searched the web, but I did not find any instructions how to configure 
the tomcat to do so.

Can anyone help me?
Thanks
Stefan


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited.
E-mail messages are not necessarily secure.  Renesas does not accept
responsibility for any changes made to this message after it was sent.
Please note that this email message has been swept by Renesas for
the presence of computer viruses.

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


Re: JSPs with Java 5 ?

2005-04-05 Thread Markus Schönhaber
Am Dienstag, 5. April 2005 16:09 schrieb Milo Grains:
>
> When will Java 5 features be available in Jasper/Tcat5.5.x to compile
> JSPs???
>
They are available. But you will have to either configure tomcat to use javac 
from tools.jar to compile JSPs or replace the Eclipse JDT coming with the 
tomcat distibution with a more recent version.

Regards
mks

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



JSPs with Java 5 ?

2005-04-05 Thread Milo Grains
Hello, 

When will Java 5 features be available in Jasper/Tcat5.5.x to compile JSPs???

Thanks, Milo


-- 
___
Get your free email from http://www.dellmail.com




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



Compile JSPs with Java 5 features?

2005-03-22 Thread Milo Grains

I've followed the directions in the docs to get 5.5.7 to compile JSPs with 
-source 1.5 features.  It stays in -source 1.4 mode. 

I know the docs say the IBM compiler will be updated to handle Java 5 feature. 
When inner classes were introduced in jdk 1.1, it took IBM a year to implement 
inner classes in their compiler and IDE.  

Has anyone gotten this to work using the compiler flags and ant? 

Thanks for your help, Milo
-- 
___
Get your free email from http://www.dellmail.com




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



Re: Need access to classes outside Tomcat for JSPs

2005-03-01 Thread Dan
You could do it that way but I don't feel that placing "common" resources 
in a specific application directory is the proper approach.

For example, if I had shared dlls that are used for Microsoft Office, I 
wouldn't place them into the Word application's directory.

At 10:50 AM 3/1/2005, Doug wrote:
Just a curious question to this, I know Dan has his setup already but is 
there any reason that this could not be set up the other way around? I 
mean that the classes/jars are in the normal spot in Tomcat and the 
outside app accesses them there. The outside app shouldn't care where the 
files reside as long as the path to them is known and this way Tomcat is a 
untouched normal install.

Or am I missing something here? I am just trying to learn.

Dan wrote:
Just as soon as I hit send
Registry entry.
HKLM | Software | Apache Software Foundation | Procrun 2.0 | Tomcat5 | 
Parameters | Java

Classpath = 
.;e:\java\library\basic;e:\java\library\custom;E:\java\Tomcat\bin\bootstrap.jar

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


Re: Need access to classes outside Tomcat for JSPs

2005-03-01 Thread Parsons Technical Services
Just a curious question to this, I know Dan has his setup already but is 
there any reason that this could not be set up the other way around? I mean 
that the classes/jars are in the normal spot in Tomcat and the outside app 
accesses them there. The outside app shouldn't care where the files reside 
as long as the path to them is known and this way Tomcat is a untouched 
normal install.

Or am I missing something here? I am just trying to learn.
Thanks
Doug
- Original Message - 
From: "Tim Funk" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, March 01, 2005 10:37 AM
Subject: Re: Need access to classes outside Tomcat for JSPs


If you happen to change the bootstrap classpath - please do not email the 
list with ClassNotFound issues. ;)

If you really need to access jar's or classes outside of your webapp you 
can either:
1) Write your own WebAppClassloader - icky but doable
2) Change $CATALINA_HOME/conf/catalina.properties and change either the 
common or shared loader. This is more managable but all webapps will share 
these classes.

Adding your own classes to the system classpath will cause major 
headaches. Adding common libraries to the common or shared classloader 
typically is the least of all evils when you can't place classes inside 
WEB-INF.

-Tim
Dan wrote:
Just as soon as I hit send
Registry entry.
HKLM | Software | Apache Software Foundation | Procrun 2.0 | Tomcat5 | 
Parameters | Java

Classpath = 
.;e:\java\library\basic;e:\java\library\custom;E:\java\Tomcat\bin\bootstrap.jar
-
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: Need access to classes outside Tomcat for JSPs

2005-03-01 Thread Tim Funk
If you happen to change the bootstrap classpath - please do not email the 
list with ClassNotFound issues. ;)

If you really need to access jar's or classes outside of your webapp you can 
either:
1) Write your own WebAppClassloader - icky but doable
2) Change $CATALINA_HOME/conf/catalina.properties and change either the 
common or shared loader. This is more managable but all webapps will share 
these classes.

Adding your own classes to the system classpath will cause major headaches. 
Adding common libraries to the common or shared classloader typically is the 
least of all evils when you can't place classes inside WEB-INF.

-Tim
Dan wrote:
Just as soon as I hit send
Registry entry.
HKLM | Software | Apache Software Foundation | Procrun 2.0 | Tomcat5 | 
Parameters | Java

Classpath = 
.;e:\java\library\basic;e:\java\library\custom;E:\java\Tomcat\bin\bootstrap.jar 

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


Re: Need access to classes outside Tomcat for JSPs

2005-03-01 Thread Dan
Just as soon as I hit send
Registry entry.
HKLM | Software | Apache Software Foundation | Procrun 2.0 | Tomcat5 | 
Parameters | Java

Classpath = 
.;e:\java\library\basic;e:\java\library\custom;E:\java\Tomcat\bin\bootstrap.jar

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


Re: Need access to classes outside Tomcat for JSPs

2005-03-01 Thread Dan
My apologies for being over the edge, but after pulling my hair out for the 
last few days and reading all kinds of web and USENET postings, along with 
searching the list archives, I came across all kinds of writings that did 
not address the issue of if (and how) this could be done, most just say to 
put them in the WEB-INF or the "shared" directories of TomCat.

I know it can be done because that's the way I have my other box setup 
now.  My "shared" classes are in E:\java\library.  My WEB-INF\classes 
directory is empty, and TomCat compiles the JSPs fine.  But for the life of 
me I cannot duplicate this setup on the new box.  That's what really makes 
this frustrating.  I've done a system search for files containing 
"library\custom" and nothing relevant shows up.  Searching the registry 
turns up nothing as well.

The only tidbit that I've come across is that parameter "java.class.path" 
is ignored when running as a service, instead "Imagepath" can specify a 
classpath.  But I don't remember doing this on my other machine, and my 
registry entries for the service don't show any additional startup 
parameters.  I wonder if procrun stores these values someplace else, but if 
so it's not stored anyplace within the Tomcat directory since I've copied 
the entire Tomcat directory from the "working" box to this box.

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


Re: Need access to classes outside Tomcat for JSPs

2005-03-01 Thread David Smith
Well, not to be "rude", but your design choice is IMHO, poor.  Build 
tools are available and designed to handle version control -- which is 
what I read as the reason for your reluctance to include the classes 
directly in the webapp.  Every few months, I see someone come on the 
list asking what you are asking and the advice is always the same: Don't 
do it that way.

Good luck in your efforts.  Just don't expect a lot of help on this.
--David
Dan wrote:
Do people read anymore?
As previously stated in the original post, these classes need to be 
available to other non-web, non TomCat applications.  I do not want to 
have to maintain two different repositories.  Also as previously 
stated I have the desired configuration running on another box but I 
cannot duplicate the setup on this box.

If your only advice is to move them into TomCat, then please don't 
even bother replying.

At 08:21 AM 3/1/2005, David wrote:
Why do you want your classes outside of Tomcat?  Copy the classes to 
your project when you build and eliminate the dependency.  Or better 
yet, use a build environment like Ant to do the copying for you.  As 
a bonus, it'll catch errors before you get to production and the 
webapp will be more portable.

--David
Dan wrote:
Classpath problem.  Really frustrating.
I'm trying to duplicate a setup on system A to system B and can't 
get it working.  My problem is when I access the JSP page, Tomcat 
complains of a ClassNotFound exception.  This happens with all of my 
custom classes.  If I create a simple JSP page with no custom 
classes the JSP compiles fine.

When I manually execute the class via "java com.xxx.MyClass" it 
responds appropriately (my environment's CLASSPATH includes the 
custom library paths).

My custom classes live outside of the Tomcat directory (see below) 
because I use these classes in other non-web based applications, so 
they need to be available system wide.

I have melted my brain today trying to figure out why system A works 
with this configuration but system B gives me the ClassNotFound 
exception.   I have even copied my entire Tomcat directory from 
system A to system B with no change.  I thought perhaps I was 
starting the service with additional parameters but I don't see any 
in the registry settings.

Does anyone have an educated guess as to why I can't get this thing 
to work the way it's working on the other system and/or how I can 
get this working with my custom classes OUTSIDE of Tomcat.


Win2K SP4
Tomcat v5.0.27 as NT Service
e:\java\tomcat
e:\java\sdk (JDK 1.4.2)
e:\java\library\custom\  (custom libraries)
e:\java\library\basic   (libraries from other sources)


-
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: Need access to classes outside Tomcat for JSPs

2005-03-01 Thread Allistair Crossley
Right, a well formed web application is packaged with its dependent classes. 
Tomcat loads classes from either WEB-INF/classes folder or the lib folder in 
the form of a JAR for your webapp, or other places like common/lib and 
shared/lib. It does not use your system classpath.

The previous poster was absolutely right with his advice. You need to sort out 
your build environment. You can still have 1 source respository, but when you 
build (via Ant let's say since it's the most ubiquitous) you direct compiled 
classes into your 2 locations. You could perhaps wrap them in a JAR for 
Tomcat's purposes, it's up to you.

Having the same classes twice is no bad thing - having source twice is. 

Allistair.

> -Original Message-
> From: Dan [mailto:[EMAIL PROTECTED]
> Sent: 01 March 2005 13:55
> To: Tomcat Users List
> Subject: Re: Need access to classes outside Tomcat for JSPs
> 
> 
> Do people read anymore?
> 
> As previously stated in the original post, these classes need to be 
> available to other non-web, non TomCat applications.  I do 
> not want to have 
> to maintain two different repositories.  Also as previously 
> stated I have 
> the desired configuration running on another box but I cannot 
> duplicate the 
> setup on this box.
> 
> If your only advice is to move them into TomCat, then please 
> don't even 
> bother replying.
> 
> 
> At 08:21 AM 3/1/2005, David wrote:
> >Why do you want your classes outside of Tomcat?  Copy the 
> classes to your 
> >project when you build and eliminate the dependency.  Or 
> better yet, use a 
> >build environment like Ant to do the copying for you.  As a 
> bonus, it'll 
> >catch errors before you get to production and the webapp 
> will be more portable.
> >
> >--David
> >
> >Dan wrote:
> >
> >>Classpath problem.  Really frustrating.
> >>
> >>I'm trying to duplicate a setup on system A to system B and 
> can't get it 
> >>working.  My problem is when I access the JSP page, Tomcat 
> complains of a 
> >>ClassNotFound exception.  This happens with all of my 
> custom classes.  If 
> >>I create a simple JSP page with no custom classes the JSP 
> compiles fine.
> >>
> >>When I manually execute the class via "java 
> com.xxx.MyClass" it responds 
> >>appropriately (my environment's CLASSPATH includes the 
> custom library paths).
> >>
> >>My custom classes live outside of the Tomcat directory (see below) 
> >>because I use these classes in other non-web based 
> applications, so they 
> >>need to be available system wide.
> >>
> >>I have melted my brain today trying to figure out why 
> system A works with 
> >>this configuration but system B gives me the ClassNotFound 
> exception.   I 
> >>have even copied my entire Tomcat directory from system A 
> to system B 
> >>with no change.  I thought perhaps I was starting the service with 
> >>additional parameters but I don't see any in the registry settings.
> >>
> >>
> >>Does anyone have an educated guess as to why I can't get 
> this thing to 
> >>work the way it's working on the other system and/or how I 
> can get this 
> >>working with my custom classes OUTSIDE of Tomcat.
> >>
> >>
> >>
> >>Win2K SP4
> >>Tomcat v5.0.27 as NT Service
> >>
> >>e:\java\tomcat
> >>e:\java\sdk (JDK 1.4.2)
> >>e:\java\library\custom\  (custom libraries)
> >>e:\java\library\basic   (libraries from other sources)
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



  1   2   3   4   5   6   7   8   9   >