Section 8.1 JSF Fundamentals
Learning Objectives
After you have completed this section, you should be able to
- define servlets, JavaServer Pages (JSP), and JavaServer Faces applications
- explain how JSF applications are accessed from web clients and processed on the server.
- create and deploy JSF applications.
- use implicit objects and Java to create dynamic web pages.
- explain how they can be used on a website.
Activities
Study Questions
- What are servlets?
- Compared with server-side CGI, what are the advantages of using Java servlets, JSP, and JSF?
- What Java extension packages do you need for Java servlets and server pages?
- What is the request–response model of communication?
- What are the relationships between Java servlets and server pages?
- What interface of which Java extension package does any servlet have to implement?
- What methods does the Servlet interface have?
- What is the life cycle of a Java servlet?
- What classes are defined in the Java servlet package?
- What class is commonly used in a web-based servlet?
- What methods does the GenericServlet class provide?
- What methods does the HttpServlet class provide?
- What are the HttpServletRequest and HttpServletResponse interfaces? Where are they defined?
- How do you install Tomcat on your computer and integrate it with the web server you installed at the beginning of the course?
- How do you handle HTTP get requests in servlets?
- Where do you deploy a web application under Tomcat?
- How do you handle HTTP get requests containing data in servlets?
- How do you handle HTTP post requests in servlets?
- What are the differences between the HTTP get and post requests?
- In servlets, how do you redirect requests from a web client to other resources?
- How are cookies used in session tracking and in generating personalized web pages?
- How do you do session tracking with HttpSession?
- To develop multi-tier web applications, how do you use JDBC from servlets?
- What is JSP?
- How does JSP extend Java servlets?
- What advantages does JSP have compared with Java servlets?
- How is a request from a web browser for a JSP processed on the web server?
- How do you embed Java statements in a JSP page?
- In the context of a JSP page, what implicit objects are provided to access servlet capabilities?
- What are the scopes of implicit objects?
- How do you declare a Java variable in JSP?
- What are JSP standard actions?
- Why do you need these JSP standard actions?
- How do you call JSP standard actions in a web page?
- What can you do using the <jsp:include> action?
- What can you do using the <jsp:forward> action?
- What can you do using the <jsp:plugin> action?
- What can you do using the <jsp:param> action?
- What can you do using the <jsp:useBean> action?
- What can you do using the <jsp:setProperty> action?
- What can you do using the <jsp:getProperty> action?
- How do you implement an advertisement rotator inside a web page using JSP or other website technology you have learned so far?
- What are directives?
- What JSP directives can you use to specify page settings?
- How are JSP directives delimited in JSP pages?
- What can you do with the JSP page directive?
- What attributes does the page directive have? How do you use these directives?
- What can you do with the JSP include directive?
- What are custom tag libraries?
- How do you access JSP custom tag libraries from within JSP pages?
- What are the advantages of using custom tags compared with using action <jsp:useBean> and JavaBean?
- What is NetBeans?
- How do you use the taglib directive?
- What attributes does the taglib directive have?
- What is a tag library descriptor?
- How do you implement custom tags?
- How do you use JSP custom tags in a web page?
- What are custom tag handlers?
- How do you define a custom tag handler in Java?
- How do you define custom tags with attributes in a custom tag handler?
- How do you use custom tags with attributes?
- How can you use custom tags to process the element body?
- What additional methods are required to process the element body using custom tags?
Review
Do the self-review exercises at the end of Chapter 26.
Summary
Read the Chapter 26 summary.