















































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!
















































Hasan Mahmud Department of Information and Communication Technology (ICT) Bangladesh University of Professionals (BUP)
Servlet Application Architecture
} else if (method.equals ("HEAD")) { long lastModified; lastModified = getLastModified (req); maybeSetLastModified (resp, lastModified); doHead (req, resp); } else if (method.equals ("POST")) { doPost (req, resp); } else if (method.equals ("PUT")) { doPut(req, resp); } else if (method.equals ("DELETE")) { doDelete(req, resp); } else if (method.equals ("OPTIONS")) { doOptions(req,resp); } else if (method.equals ("TRACE")) { doTrace(req,resp); } else { resp.sendError (HttpServletResponse.SC_NOT_IMPLEMENTED, "Method '" + method + "' is not defined in RFC 2068 "); }} service()
// set content type and other response header fields first response.setContentType("text/html"); // then write the data of the response out = response.getWriter(); out.println(""); out.println(title); out.println(""); out.println("" + title + ""); out.println("
This is output from SimpleServlet."); out.println("
"); out.close(); } } A taste of servlet programming..Make your choice: Auto Bus Truck
Red Silver
Make your choice: Auto Bus Truck