Home > Articles

  • Print
  • + Share This
This chapter is from the book

Apply Your Knowledge

Review Questions

  1. What language is used to write servlets and JSP?

  2. What is the servlet life cycle and what manages it?

  3. What protocol do servlets and JSP use to communicate with clients?

  4. What is the relationship between servlets and JSP?

Answers to Review Questions

  1. Servlets are written in the Java language. JSPs on the other hand use a combination of HTML and Java. Eventually JSPs are converted into a pure Java servlet. See "Servlet and JSP History," earlier in this chapter.

  2. The servlet life cycle refers to the loading, initialization, invoking, and killing of a servlet. The container manages this life cycle. See "Web Servers and Servlet Containers," earlier in this chapter.

  3. Servlets use the HTTP protocol. See "Web Servers and Servlet Containers," earlier in this chapter.

  4. JSPs are converted to servlets. First, the JSP source is parsed and a Java source file is generated. Then this source is compiled into a servlet. See "JSP," earlier in this chapter.

Suggested Readings and Resources

  1. Java Servlet Technology, http://java.sun.com/products/servlet/whitepaper.html.

  2. Exam objectives for the Sun Certified Web Component Developer for J2EE Platform, http://suned.sun.com/US/certification/java/exam_objectives.html.

  3. The Java Servlet 2.3 Specification, http://jcp.org/aboutJava/communityprocess/first/jsr053/index.html.

  4. The Java Servlet 2.3 API, http://java.sun.com/products/servlet/2.3/javadoc/index.html.

  5. Sun's basic "Writing Servlets" tutorial: http://developer.java.sun.com/developer/onlineTraining/Programming/BasicJava1/ servlet.html.

  6. Another tutorial on learning servlets: http://java.sun.com/docs/books/tutorial/servlets/index.html.

  7. The Servlet/JSP tutorial series by Marty Hall: http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/.

  8. jGuru Tomcat FAQ: http://www.jguru.com/faq/Tomcat.

  • + Share This
  • 🔖 Save To Your Account