How to generate servlet from JSP?

Discussions

Web tier: servlets, JSP, Web frameworks: How to generate servlet from JSP?

  1. How to generate servlet from JSP? (2 messages)

    in fact ,i build tool to generate gxl from source code java ,(but sometimes java applications include jsp ) so as i know when we using tomcat , jboss or another web server ,it will generate a servlet from jsp,
    i wonder how to generate this servlet without using any web server, can i write a program to do this task?and how to do it?

    thanks.
  2. How to generate servlet from JSP?[ Go to top ]

    Tomcat comes along with 2 batch files in the bin directory.
    jspc.bat and jasper.bat

    The jspc is the offline jsp compiler, It will generate XXX_jsp.java and XXX_jsp.class files.

    However, Im not sure whether you will be able to obtain these without getting tomcat.
    There must be other such implementations that ship with other servers.

    But there is really no point having jsps without having a server now, is it?
  3. How to generate servlet from JSP?[ Go to top ]

    Tomcat comes along with 2 batch files in the bin directory.jspc.bat and jasper.batThe jspc is the offline jsp compiler, It will generate XXX_jsp.java and XXX_jsp.class files.However, Im not sure whether you will be able to obtain these without getting tomcat.There must be other such implementations that ship with other servers.But there is really no point having jsps without having a server now, is it?

    Using jasper.bat will generate servlets that will run on that version of tomcat, don't even try to use thoes servlets on weblogic... jboss...

    Why would you want a servlet instead of a jsp?