Is there a ‘standard’ practice for packaging JSPs when preparing WAR for Production Env?
Are they included as “.jsp” files?
Or are they included as pre-compiled Java files, or pre-compiled class files?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The Servelts/JSP spec says nothing about precompiling JSPs making this feature specific to container implementation. You can pre-compile for a specific container, say for Tomcat or for WebLogic and you will surely find Ant tasks to do so.
Generally, when you package your app you know your target. If it’s more than one container (say you package a downloadable product) then your only option is to package raw JSPs into your WAR file. That said, however, when you’re in development and/or testing you certainly can pre-compile as part of your build process to a) validate that your JSPs are correct and b) speed up the start-up time. You can even have your Eclipse do it for you if you need that extra validation step as you are building your software.
I don’t think there’s an industry practice to do one way or the other. From what I have experienced the JSPs are usually packaged “raw” (not pre-compiled) for deployment and distribution but are pre-compiled as part of build/test process.