You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by fred basset <fr...@gmail.com> on 2010/03/25 17:56:31 UTC

Any way to pre-compile JSPs in Tomcat

As per the subject line, can I configure Tomcat to pre-compile the
JSPs before we ship out a .war file?

thx,
Fred

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Any way to pre-compile JSPs in Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

On 3/25/2010 4:33 PM, Mark Thomas wrote:
> On 25/03/2010 19:41, Christopher Schultz wrote:
>> Do you mean that you'll need to use a matching version in order to enjoy
>> all the benefits and features of that version, or is there something
>> more sinister?
>>
>> I would expect that you can pre-compile JSPs into servlets that will run
>> on any servlet container using the same servlet API version and tag
>> library versions (including JSTL, which might vary from Tomcat-to-Tomcat).
> 
> Nope. pre-compilation ties in Tomcat internals which can, and have,
> varied between point releases.

Good to know. Is there any checking done before running a JSP that has
been precompiled? That would seem to be a good thing to do. If such
checking isn't being done, I'd be happy to propose a solution and maybe
submit a patch.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkus4QAACgkQ9CaO5/Lv0PD6CACgtIKKY8JFIZylb94F3TaX2hoB
taAAn0CTUufY7+lBzb06q3Kc/6+jtWRa
=JflY
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Any way to pre-compile JSPs in Tomcat

Posted by Mark Thomas <ma...@apache.org>.
On 25/03/2010 19:41, Christopher Schultz wrote:
> Do you mean that you'll need to use a matching version in order to enjoy
> all the benefits and features of that version, or is there something
> more sinister?
> 
> I would expect that you can pre-compile JSPs into servlets that will run
> on any servlet container using the same servlet API version and tag
> library versions (including JSTL, which might vary from Tomcat-to-Tomcat).

Nope. pre-compilation ties in Tomcat internals which can, and have,
varied between point releases.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Any way to pre-compile JSPs in Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Konstantin,

On 3/25/2010 2:01 PM, Konstantin Kolinko wrote:
> 2010/3/25 Pid <pi...@pidster.com>:
>> On 25/03/2010 16:56, fred basset wrote:
>>>
>>> As per the subject line, can I configure Tomcat to pre-compile the
>>> JSPs before we ship out a .war file?
>>
>> The catalina-tasks.xml file in tomcat/bin contains some importable ant
>> tasks.
>>
>> See also:
>>
>>  http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html
>>
> 
> Please note, though, that
> 1. You must use exactly the same version of Tomcat (x.y.z) as the one
> where you will be deploying your war file.

Do you mean that you'll need to use a matching version in order to enjoy
all the benefits and features of that version, or is there something
more sinister?

I would expect that you can pre-compile JSPs into servlets that will run
on any servlet container using the same servlet API version and tag
library versions (including JSTL, which might vary from Tomcat-to-Tomcat).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkurvH0ACgkQ9CaO5/Lv0PB4QACdFQ8ukAlZwVG9YNbAr+54iLxH
6QgAn17IzykgGW7Iou9kDYUGNsPnFu4z
=PGjw
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Any way to pre-compile JSPs in Tomcat

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/3/25 Pid <pi...@pidster.com>:
> On 25/03/2010 16:56, fred basset wrote:
>>
>> As per the subject line, can I configure Tomcat to pre-compile the
>> JSPs before we ship out a .war file?
>
> The catalina-tasks.xml file in tomcat/bin contains some importable ant
> tasks.
>
> See also:
>
>  http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html
>

Please note, though, that
1. You must use exactly the same version of Tomcat (x.y.z) as the one
where you will be deploying your war file.
2. Some Jasper options and system properties affect compilation. It is
unlikely that that will be a concern for you, though.

3. It is possible to precompile JSP pages of a web application that is
already deployed on the web server. See chapter JSP.11.4.2
"Precompilation Protocol" in the JSP 2.1 specification.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Any way to pre-compile JSPs in Tomcat

Posted by Pid <pi...@pidster.com>.
On 25/03/2010 16:56, fred basset wrote:
> As per the subject line, can I configure Tomcat to pre-compile the
> JSPs before we ship out a .war file?

The catalina-tasks.xml file in tomcat/bin contains some importable ant 
tasks.

See also:

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


p

> thx,
> Fred
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Any way to pre-compile JSPs in Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: fred basset [mailto:fredbasset1000@gmail.com]
> Subject: Any way to pre-compile JSPs in Tomcat
> 
> As per the subject line, can I configure Tomcat to pre-compile the
> JSPs before we ship out a .war file?

Only if you read the doc:
http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Production%20Configuration

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org