CIT597 Quiz 5 (Servlets)
Fall, 2007

Please keep all answers short and to the point. Read each question and answer it; don't add information that wasn't asked for.

  1. (10 points) List two important differences between servlets and CGI scripts.

  2. In an HttpServlet ,
    1. (8 points) What are the names of the two methods you are most likely to override?

    2. (4 points) What are the parameter types required by these two methods?

  3. (12 points) Each servlet has three names. Briefly, what are those names?

  4. (5 points) Tomcat requires the Deployment Descriptor file to have a certain name. What is that name?

  5. (12 points) If you don't use Java's Session Tracking API, list the three techniques you can use to keep track of a session ID.

  6. (5 points) What session tracking technique does Java's Session Tracking API use when starting a new session?

  7. (6 points) When using Java's Session Tracking API, how do you get a session? Specify both the object that you ask for the session and the message you send to it.

  8. (12 points) Tell what goes inside each of the following JSP constructs.

    1. <%=____________________________%>

    2. <%____________________________%>

    3. <%!____________________________%>

  9. (9 points) Name the three scopes that can be accessed by a servlet.

  10. (4 points) What is the distinction between a parameter and an attribute?

  11. (4 points) In what object does the servlet communicate its results to the JSP?

  12. (3 points) Name one place that a servlet can keep information that is thread-safe.

  13. (6 points) In class I listed three advantages of using MVC. Mention two of them.