Chapter 02 - Understanding JavaServer Pages

This chapter introduces the JavaServer pages (JSP) technology. We have shown three ways to print "Hello World" on the browser - the pure HTML way, the Servlet way, and the JSP way. To execute these examples, either type the following URLs yourself or click on the following links:

Common: Hello.htmlhttp://localhost:8080/chapter02/Hello.html
 
To John: Hello Servlethttp://localhost:8080/chapter02/servlet/HelloServlet?userName=John
To John: Hello.jsphttp://localhost:8080/chapter02/Hello.jsp?userName=John
 
To Mary: Hello Servlethttp://localhost:8080/chapter02/servlet/HelloServlet?userName=Mary
To Mary: Hello.jsphttp://localhost:8080/chapter02/Hello.jsp?userName=Mary


Note: If you have tomcat running on a different port than 8080, please replace 8080 in the URL with the port number you are using.