Discussions

General J2EE: What happened after making new changes in already compiled jsp?

  1. In jsplife cycle there is one translation time, in that case we first converting .jsp to .java after that we are compiling that .java and creating .class. Now my q is after making new changes in the already compiled jsp, this "translation time" can repeated? again we creating .java ----> .class? i.e. jsp container replacing the old .java with new .java? because in server side we have both file .java and .class for each jsp which is passed through translation time phase i.e. after adding new changes in jsp we are replacing both .java & .class with new one?

    What happened in after making new changes in jsp which is already compiled?

  2. Hi

    it should be depend on the server container. consider an example for tomcat.

    Tomcat 5.5 uses the Jasper 2 JSP Engine to implement the JavaServer Pages 2.0 specification.

    • Background JSP compilation - If you make a change to a JSP page which had already been compiled Jasper 2 can recompile that page in the background. The previously compiled JSP page will still be available to serve requests. Once the new page has been compiled successfully it will replace the old page. This helps improve availability of your JSP pages on a production server.
    • Recompile JSP when included page changes - Jasper 2 can now detect when a page included at compile time from a JSP has changed and then recompile the parent JSP.

     You can find more information on the Apache TOmcat home page