


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















These are the ports of most interest to us
Client sends a request to server Server starts a servlet Servlet computes a result for server and does not quit
Another client sends a request
client servlet
Server calls the servlet again Etc.
Server returns response to client
(from the Tomcat installation documentation) public class HelloServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String docType = "\n"; out.println(docType + "\n" + "Hello\n" + "\n" + "Hello World\n" + ""); } } Don’t worry, we’ll take this a little at a time!
URL? name = value & name = value & name = value