Discussions
Web tier: servlets, JSP, Web frameworks: Precompiling JSPs in Oracle 10gAS/JDeveloper/Ant
-
Precompiling JSPs in Oracle 10gAS/JDeveloper/Ant (3 messages)
- Posted by: Swami .
- Posted on: June 12 2006 19:38 EDT
Hello all, We currently have a J2EE application running on Oracle 10g AS. We use JDeveloper as the development tool and Ant for building our application code. I am wondering if there is a way where we can compile JSPs while building or deploying the application. Currently we are having to visit each page once after deployment to make sure user experience is not unusually delayed due to JSP compilation during first time access. Since this is not a fool-proof method (we can always miss out a page) and since this is too cumbersome, I am wondering if there is a good way to do it in either the ant script (which we use for build) or sometime during deployment. Any help appreciated.Threaded Messages (3)
- Re: Precompiling JSPs in Oracle 10gAS/JDeveloper/Ant by Suraj Mathai on June 13 2006 11:33 EDT
- Precompile with caution... by Bob Armour on June 14 2006 10:13 EDT
- Re: Precompile with caution... by Viliam Durina on June 15 2006 01:16 EDT
- Precompile with caution... by Bob Armour on June 14 2006 10:13 EDT
-
Re: Precompiling JSPs in Oracle 10gAS/JDeveloper/Ant[ Go to top ]
- Posted by: Suraj Mathai
- Posted on: June 13 2006 11:33 EDT
- in response to Swami .
Explore JSPC ant task , which helps u pre compile JSPs -
Precompile with caution...[ Go to top ]
- Posted by: Bob Armour
- Posted on: June 14 2006 10:13 EDT
- in response to Suraj Mathai
Explore JSPC ant task , which helps u pre compile JSPs
From past experience, precompiling with JSPC, on the development or build machine, is not necessarily a good idea. There seems to be issues with the output being 'incompatible' (in some way) with that which is produced when you let the container compile the pages in-situ. (I know that this seems to contradict the 'build once, run anywhere' philosopy of Java, but evidence suggests otherwise) Depending on your container, you should be able to get it to do the precomile for you, at deploy time. I'd investiagte the documentation for your container before deciding which option to take. -
Re: Precompile with caution...[ Go to top ]
- Posted by: Viliam Durina
- Posted on: June 15 2006 01:16 EDT
- in response to Bob Armour
I agree. For example Oracle Application Server has several ways how to compile JSP to java, it is with or without compile tag reuse in several modes. We had a problem, that on one system it was on and on another it was off. We had some tag library which had bug in tag's release() method and as a side effect the bug was not reported and causing memory leaks if compile tag reuse was on, and was correctly reported when it was off. Java files generated from JSPs use server's internal classes, so if you don't have exact JSP precompiler as on the server, it could be dangerous, if working at all.