2 Replies Latest reply on Mar 6, 2002 5:27 AM by servigo

    Precompile JSPs

    Scott Hodson Newbie

      I'd like to have my JSPs pre-compiled before I build my new EAR, have it deployed, and view a page in my browser to see if my JSP would compile.

      Is there any way to pre-compile my JSPs before deploying a new EAR or WAR? This would save a lot of time.

        • 1. Re: Precompile JSPs
          Adam Young Newbie

          $CATALINA/bin/jspc.sh or $TOMCAT/bin/jspc.sh

          THat will compile the pages. I think there might be some mapping issues as well..

          • 2. Re: Precompile JSPs
            servigo Newbie

            Well, there is jasper.JspC compiler, which allows to compile jsp into java source code, but what I am interested about is precompiling just when deploying. It means not for testing (checking validity) but for better access time. Normally are deployed JSP compiled when first time access. I would like to have these compilation being performed on one place when deploying, then even first hit would be processed fast. I've read about one way: compile and put generated classes in war-file with appropriate servlet,servlet-mapping in web.xml, but this doesn't look good to me: additional work;-) (for every jsp!!!)
            Well, exist some other clever way(s) to achieve this kind of 'pre-compilation'?

            I mean it could be in specific server descriptor, but I didn't find something like this in Tomcat.