Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com
This is simplest.jsp .
Many JSP elements can be recognized by
This .jsp consists mainly of HTML and has
but one Java expression.
<%= ....... %>
This comment line will not be in the HTML sent to the client.
If the HTTP server receives a request for a .jsp from a client('s browser), the .jsp file is read by a JSP engine/container, that converts it into a .java source code file and has it compiled into a .class file, to be run as a servlet.
The servlet then sends HTML to the HTTP server, that, in turn, sends it to the client.
Our expression ....
.. ends up in the servlet's source code like this, in its service method.
One very convenient development tool is Tomcat from the Apache organization, that has made
this source code from our simplest.jsp .
(See Tomcat's link below)
Tomcat contains the jar-files needed to run JSP in its common/lib folder.
You can test jsp's easily by placing them into a .war folder (or file) and deploy that ( to Tomcat's web-apps, JBoss /deploy f.i.) .
No web.xml is required for testing.
Tomcat can run standalone, it has an onboard HTTP-server, Coyote. Its default port is
Source code will be generated and compiled on a need-to-generate base.
A possible way to have a jsp precompiled, if the engine supports it, before any clients are going to call it. Most J2EE servers have a deployment option for precompiling.