Java & J2EE Overview of Java Web Technologies, Part 1 |
JavaServer Faces (JSF) applications are servlet / JavaServer Pages (JSP) applications based on the Model 2 architecture. Therefore, writing JSF applications requires you to be familiar with the servlet and JSP technologies, as well as the related technologies of JavaBeans and custom tags, plus the Model 2 architecture. This book assumes that you already have some servlet/JSP programming experience. However, to quickly refresh your memory, this chapter presents a brief overview of those technologies, focusing on topics directly related to writing JSF applications. Servlets Servlets are Java classes that run on a special Web server called a servlet/JSP container or Web container. In servlet programming, you use the classes and interfaces from two packages:
The most important type in these two packages is the javax.servlet.Servlet interface, which all servlets must implement (or extend a class that does). We’ll begin our review of servlets by taking a look at the Servlet interface. The javax.servlet.Servlet interface defines the three lifecycle methods: init, service, and destroy. The servlet container calls these methods during the life of a servlet. NOTE: The alternative to implementing the Servlet interface directly is to extend the javax.servlet.GenericServlet class or the javax.servlet.http.HttpServlet class.
blog comments powered by Disqus |