SE452: Homework [16/16] Previous pageContents

Goal: To gain familiarity with the Session API and to learn how to write some simple JSPs

  1. Part A: Create a Servlet that creates a session. You could have the Servlet only create a session when a successful login is achieved, or create a session by default with any request. Store some data in the session, and show that the data is persisted across requests by redisplaying the data in a subsequent request. This can be done by either using two different HTML forms, or providing links to the user in the Servlet response.
  2. Part B: Create a JSP that displays dynamic data when invoked. This means that the content should depend on something that is available in the request. For example, depending on what one of the request headers are from the client, you could display different data. Or, you could create a JSP that submits a form to itself and displays a response based on the form submission.

Supply the application as a deployable war file. Test deploying it before submitting it to make sure you have the format right. Place the source files for the servlet in a src directory in the war file.

Grading Breakdown:

ItemPoints
Part A - configuration (web.xml)10
Part A - Proper use of session APIs30
Part A - Coding style, javadoc10
Part B - concept and implementation30
Part B - Coding style10
Proper Submission10
Total:100

Previous pageContents