Sunday, September 28, 2014

How to Convert JSP to Java

Instructions

    1

    Write a JSP page. The JSP page can contain HTML as well as Java code. The file can be a simple HTML document saved with a ".jsp" extension. Name the file "test.jsp".

    2

    Start the Tomcat server or confirm that it is installed and activated. Apache Tomcat runs Java Server Pages and compiles them into Java. Tomcat can be downloaded from Tomcat.apache.org.

    3

    Execute the Web page through the browser. If Tomcat is running, simply point your browser to "http://localhost:8080/examples/jsp/test.jsp".

    4

    Get the file from the temp directory. Once it has run through the server, the JSP file becomes a Java file and it is stored in the work directory of the app. This directory differs, depending on the operating system. You can get the .java file from that directory.



No comments:

Post a Comment