Since JSPs adhere to a standard API, can I precompile them in my projects and then deploy the result on any server?
Specifically, I’m using Tomcat, JBoss and WebSphere.
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.
No, not really. If you look at the java source that gets created by the JSP compiler, you’ll see that it extends a base class that’s proprietary to the container. For example, JBoss 4’s servlet container generates JSP classes that extend
org.apache.jasper.runtime.HttpJspBase, which is Tomcat and JBossWeb-specific.So you might be able to reuse pre-compiled JSPs between different tomcat-based servers, but even then it might not work.