Re: war deployment and jsp pre-compilation

2003-07-11 Thread Jacob Kjome
At 02:40 PM 7/11/2003 +0200, you wrote:
I'm afraid, I wasn't clear enough explaining the issue. First, let's 
assume, I do not pre-compile my JSPs and deploy the war with the manager 
app.  Upon the first request, Tomcat will go about and compile the JSPs to 
the working directory. As there is no context entry in the server.xml, 
Tomcat will use its default working directory.

Now, I'd like to pre-compile the JSPs including only the compiled JSP 
classes in the war file. This means that Tomcat would have to load the JSP 
classes directly from the war file instead of from its working directory. 
Can this be done?

I hope the issue is clear now.
Yes, again, pre-compled jsp file are servlets.  They don't get compiled at 
runtime, again, because they are servlets.  You now have to register and 
map them in the web.xml just like any other servlet.  If by pre-compiling, 
you mean run some script which accesses each jsp file at runtime so that 
when a real human accesses them they will already be compiled, then you 
don't have to worry about the mapping.  Actually, you should never have to 
worry about the work directory stuff.  Tomcat will use a work directory 
whether or not an app is deployed from a .war file or directory.  Which 
work directory is not of the app's concern, but of Tomcat's.  You are going 
to have to explain exactly where you think this whole thing will fail when 
running from a .war file because it is still not clear to me.

Jake

Thanks for any insight.

Reinhard

Jacob Kjome wrote:

At 11:05 AM 7/11/2003 +0200, you wrote:

Thanks, but that's not the problem. I know how to use Ant and jspc. The 
question is whether/how I can tell Tomcat to load pre-compiled JSPs from 
my war file which is not unpacked as I deploy with unpackWars set to false.


The work directory is Tomcat's temp directory.  It is the one place that 
is guaranteed to allow files to be written for a webapp.  It has nothing 
to do with your issue.  Actually, I'm not really sure what you are 
talking about.  Precompiled jsp's added to the webapp are just 
servlets.  You don't need to use File IO to load servlets.  They should 
be able to run out of a .war file just as they can from a directory.  You 
specify this using  and  entries in in web.xml 
just like any other servlet.  Are you saying that this works for you when 
the .war is unpacked, but not when it isn't?  That would be truly 
odd.  you'll need to explain why you think things aren't working from a 
.war file first before anyone can help you here.

Jake

Any ideas?

Reinhard

Johannes Fiala wrote:

Hi Reinhard,

Using TC 4.1.24+ you can use ant to first run JspC and deploy the 
resulting WAR using the manager app.

You can find more info here:
http://www.fwd.at/tomcat/buildmanagement-using-ant-howto.html
Johannes



Reinhard Nägele <[EMAIL PROTECTED]> 10.07.2003 15:38
Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>
To
[EMAIL PROTECTED]
cc
Subject
war deployment and jsp pre-compilation




We deploy our application as war file with the manager. "unpackWars" is 
set to false. Is it possible to deploy pre-compiled JSPs with this 
approach? I guess this would imply that we'd have to have a context.xml 
in our war file specifying that Tomcat should load the compiled JSP 
classes from the war file instead of from its working directory. Can 
this be done?

Reinhard



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


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


Re: war deployment and jsp pre-compilation

2003-07-11 Thread Reinhard Nägele
I'm afraid, I wasn't clear enough explaining the issue. First, let's 
assume, I do not pre-compile my JSPs and deploy the war with the manager 
app.  Upon the first request, Tomcat will go about and compile the JSPs 
to the working directory. As there is no context entry in the 
server.xml, Tomcat will use its default working directory.

Now, I'd like to pre-compile the JSPs including only the compiled JSP 
classes in the war file. This means that Tomcat would have to load the 
JSP classes directly from the war file instead of from its working 
directory. Can this be done?

I hope the issue is clear now.

Thanks for any insight.

Reinhard

Jacob Kjome wrote:

At 11:05 AM 7/11/2003 +0200, you wrote:

Thanks, but that's not the problem. I know how to use Ant and jspc. 
The question is whether/how I can tell Tomcat to load pre-compiled 
JSPs from my war file which is not unpacked as I deploy with 
unpackWars set to false.


The work directory is Tomcat's temp directory.  It is the one place 
that is guaranteed to allow files to be written for a webapp.  It has 
nothing to do with your issue.  Actually, I'm not really sure what you 
are talking about.  Precompiled jsp's added to the webapp are just 
servlets.  You don't need to use File IO to load servlets.  They 
should be able to run out of a .war file just as they can from a 
directory.  You specify this using  and  
entries in in web.xml just like any other servlet.  Are you saying 
that this works for you when the .war is unpacked, but not when it 
isn't?  That would be truly odd.  you'll need to explain why you think 
things aren't working from a .war file first before anyone can help 
you here.

Jake

Any ideas?

Reinhard

Johannes Fiala wrote:

Hi Reinhard,

Using TC 4.1.24+ you can use ant to first run JspC and deploy the 
resulting WAR using the manager app.

You can find more info here:
http://www.fwd.at/tomcat/buildmanagement-using-ant-howto.html
Johannes



Reinhard Nägele <[EMAIL PROTECTED]> 10.07.2003 15:38
Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>
To
[EMAIL PROTECTED]
cc
Subject
war deployment and jsp pre-compilation




We deploy our application as war file with the manager. "unpackWars" 
is set to false. Is it possible to deploy pre-compiled JSPs with 
this approach? I guess this would imply that we'd have to have a 
context.xml in our war file specifying that Tomcat should load the 
compiled JSP classes from the war file instead of from its working 
directory. Can this be done?

Reinhard



-
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: war deployment and jsp pre-compilation

2003-07-11 Thread Jacob Kjome
At 11:05 AM 7/11/2003 +0200, you wrote:
Thanks, but that's not the problem. I know how to use Ant and jspc. The 
question is whether/how I can tell Tomcat to load pre-compiled JSPs from 
my war file which is not unpacked as I deploy with unpackWars set to false.
The work directory is Tomcat's temp directory.  It is the one place that is 
guaranteed to allow files to be written for a webapp.  It has nothing to do 
with your issue.  Actually, I'm not really sure what you are talking 
about.  Precompiled jsp's added to the webapp are just servlets.  You don't 
need to use File IO to load servlets.  They should be able to run out of a 
.war file just as they can from a directory.  You specify this using 
 and  entries in in web.xml just like any other 
servlet.  Are you saying that this works for you when the .war is unpacked, 
but not when it isn't?  That would be truly odd.  you'll need to explain 
why you think things aren't working from a .war file first before anyone 
can help you here.

Jake

Any ideas?

Reinhard

Johannes Fiala wrote:

Hi Reinhard,

Using TC 4.1.24+ you can use ant to first run JspC and deploy the 
resulting WAR using the manager app.

You can find more info here:
http://www.fwd.at/tomcat/buildmanagement-using-ant-howto.html
Johannes



Reinhard Nägele <[EMAIL PROTECTED]> 10.07.2003 15:38
Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>
To
[EMAIL PROTECTED]
cc
Subject
war deployment and jsp pre-compilation




We deploy our application as war file with the manager. "unpackWars" is 
set to false. Is it possible to deploy pre-compiled JSPs with this 
approach? I guess this would imply that we'd have to have a context.xml 
in our war file specifying that Tomcat should load the compiled JSP 
classes from the war file instead of from its working directory. Can this 
be done?

Reinhard



-
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: war deployment and jsp pre-compilation

2003-07-11 Thread Reinhard Nägele
Thanks, but that's not the problem. I know how to use Ant and jspc. The 
question is whether/how I can tell Tomcat to load pre-compiled JSPs from 
my war file which is not unpacked as I deploy with unpackWars set to false.

Any ideas?

Reinhard

Johannes Fiala wrote:

Hi Reinhard,

Using TC 4.1.24+ you can use ant to first run JspC and deploy the 
resulting WAR using the manager app.

You can find more info here:
http://www.fwd.at/tomcat/buildmanagement-using-ant-howto.html
Johannes



Reinhard Nägele <[EMAIL PROTECTED]> 
10.07.2003 15:38
Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>

To
[EMAIL PROTECTED]
cc
Subject
war deployment and jsp pre-compilation




We deploy our application as war file with the manager. "unpackWars" is 
set to false. Is it possible to deploy pre-compiled JSPs with this 
approach? I guess this would imply that we'd have to have a context.xml 
in our war file specifying that Tomcat should load the compiled JSP 
classes from the war file instead of from its working directory. Can 
this be done?

Reinhard



-
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: war deployment and jsp pre-compilation

2003-07-10 Thread Johannes Fiala
Hi Reinhard,

Using TC 4.1.24+ you can use ant to first run JspC and deploy the 
resulting WAR using the manager app.

You can find more info here:
http://www.fwd.at/tomcat/buildmanagement-using-ant-howto.html

Johannes




Reinhard Nägele <[EMAIL PROTECTED]> 
10.07.2003 15:38
Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>


To
[EMAIL PROTECTED]
cc

Subject
war deployment and jsp pre-compilation






We deploy our application as war file with the manager. "unpackWars" is 
set to false. Is it possible to deploy pre-compiled JSPs with this 
approach? I guess this would imply that we'd have to have a context.xml 
in our war file specifying that Tomcat should load the compiled JSP 
classes from the war file instead of from its working directory. Can 
this be done?

Reinhard



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