Skip to main content

[webtier] Question on JSPC porting from Tomcat to GlassFish

5 replies [Last post]
Anonymous

Mike posted some questions via a blog. I suggested to him to send mail
to this alias but, saving some time, they are at

http://closingbraces.net/2008/07/21/jspc-switching-from-tomcat-to-glassf...

- eduard/o

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Rajiv Mordani

Hi Kinman,
See comments in-line -

webtier@javadesktop.org wrote:
> In answer to some of the issues raised by Mike in his blog:
>
> * Glassfish does not include an Ant task for JSP compilation. Though it does include a jspc script, it is not usually used. The deploy option --precompilejsp makes manual compilation of JSP pasges unnecessary. I believe the ant task that work for tomcat may also work in glassfish.
>

Does it make sense to provide the ant task (or a modified version of it
if it does not work) from jsp.dev.java.net that can also be available
via maven?

> * Jspc in Glassfish includes for compilation all JSP pages that has .jsp and.jspx suffices, as well as those that are declared (with jsp-config) as JSP files in web.xml.
>
> * Yes, jsr 199 is supported. Glad that you've found it to be much faster.
>

Yes indeed. We need to make sure that this makes it into the
documentation as well if it isn't already there.

Thanks

- Rajiv

> * Jpsc lets you direct the resultant class files with -d option.
> [Message sent by forum member 'kchung' (kchung)]
>
> http://forums.java.net/jive/thread.jspa?messageID=291014
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

kchung
Offline
Joined: 2004-05-06
Points: 0

Yes. It does make sense to provide an ant task in jsp.dev.java.net. We can start with the one from Tomcat, and it'll need some work, since we have added some new options to jspc.

kchung
Offline
Joined: 2004-05-06
Points: 0

In answer to some of the issues raised by Mike in his blog:

* Glassfish does not include an Ant task for JSP compilation. Though it does include a jspc script, it is not usually used. The deploy option --precompilejsp makes manual compilation of JSP pasges unnecessary. I believe the ant task that work for tomcat may also work in glassfish.

* Jspc in Glassfish includes for compilation all JSP pages that has .jsp and.jspx suffices, as well as those that are declared (with jsp-config) as JSP files in web.xml.

* Yes, jsr 199 is supported. Glad that you've found it to be much faster.

* Jpsc lets you direct the resultant class files with -d option.

mkaufman
Offline
Joined: 2007-01-23
Points: 0

Thanks. That clears up the situation re Ant script. For info, I do often use the jspc run purely as a validation check, in builds that don't do an actual "deploy" (e.g. put the .war into auto-deploy directory, or deliver copies of it to other places for archiving). Also to check the JSP before proceeding with other, sometimes lengthy, pre-deployment steps. I can't speak for anyone else, but those are some of my own reasons for sometimes wanting "manual" JSP translation, separate from actual deployment. (Out-of-container testing of JSP code might be another reason in the near future...).

As for the "-d" option, I do use this already. The issue is that it controls the destination of both the resulting Java source code and the class files produced from them. The (very minor) limitation is that there doesn't seem any way to generate the source code into one location and the class files into another. I can't immediately see any real problems from this, it's just another case of a tool unnecessarily imposing its own decision on where everything is put. Fine until you have multiple such tools with conflicting ideas, or other reasons to organize things differently. Just a little pet hate of mine!

Thanks again,
Mike Kaufman

kchung
Offline
Joined: 2004-05-06
Points: 0

To be frank, the need for different locations for generated .java and .class files has never came up. Guess in general you don't need to see .java files, unless you are are debugging the JSP page. What we actually need is to allow the combination of "-d

-compile true -keepGenerated false", so that .java files will be removed after compilations.