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?
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?
They are packaged as .jsp files itself. Please do take care about the jsp file size limit of 64K jsp file size limit
In my experience, they are just shipped in the WAR as .jsp files. The application server will automatically compile the .jsp into a class file. See here for more info on the jsp life cycle.
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.