Problem 2
State whether each of the following is true or false. If false, explain why. a) Servlets usually are used on the client side of a networking application. b) Servlet methods are executed automatically. c) The two most common HTTP requests are get and put. d) The well-known port number for Web requests is 55 e) Cookies never expire. f) Httpsessions expire only when the browsing session ends or when the invalidate method is called. g) The Httpsession method getAttribute returns the object associated with a particular name.
Problem 10
Write a Web application that consists of a servlet (DirectoryServlet) and several Web documents. Document index.html should be the first document the user sees. In that document, you should have a series of hyperlinks for other Web pages in your site. When clicked, each hyperlink should invoke the servlet with a get request that contains a page parameter. The servlet should obtain parameter page and redirect the request to the appropriate document.