CIT 597 Quiz 6: Servlets and JSP
Fall 2008, David Matuszek Name_________________________________________
  1. (10 points) List two differences between a servlet and a CGI script.




  2. (6 points) The service method takes two parameters. What are the types of those parameters?


  3. (4 points) Tell one limitation of sending a request with GET (as opposed to POST).



  4. (5 points) If either GET or POST will work for you, how should you decide which to use?



  5. (5 points) What is the single most important purpose of the Deployment Descriptor?


  6. (5 points) What must a servlet or JSP do before using the PrintWriter to write out the HTML page?



  7. (5 points) What must the XML Deployment Descriptor file be named?

  8. (5 points) When the Java Session Tracking API starts a new session, it sends a cookie and does session rewriting. What does it do on the next request from the same session?




  9. (15 points) Name three predefined variables in JSP.



  10. (20 points) What are the four types of JSP "tags"? Give the syntax, including what kind of thing (expression, etc.) should be in each tag.




  11. (5 points) What distinction do servlets make between parameters and attributes?


  12. (15 points) Name (or tell what object holds) each of the three servlet scopes.