Summary

Today's lesson discussed advanced topics in the Java servlet specification that are supported by WebLogic Server. You started the day by learning the concepts of inter-servlet communication. The two ways to achieve this are the forward() and include() methods of the RequestDispatcher interface. You extended your sample BookShoppingServlet and wrote another servlet, the BookCheckOutServlet to demonstrate the concepts of servlet chaining. The BookShoppingServlet delegated control to the BookCheckOutServlet and passed data to the BookCheckOutServlet.

Filters were the next topic on the agenda. You began by studying the concepts and uses of filters and how they interact with HTTP servlets. You wrote a sample filter for your BookShoppingServlet servlet that intercepted the requests received by the BookShoppingServlet servlet and displayed log messages on the WebLogic Server's console. You also learned how to deploy filters and map them to servlets in the web.xml deployment descriptor file.

Another interesting area that you covered today was listeners. We explored the basic idea behind listeners and explained its similarity (in terms of design) to AWT listeners. Then you studied the two listener interfaces available in the Java Servlet 2.3 specification: ServletContextListener and the HttpSessionListener. To reinforce your understanding of these concepts, you wrote simple listeners implementing the ServletContextListener and HttpSessionListener interfaces.

You rounded off the day's session by writing the first building block of your case study MVC application, the Airline Ticket Booking System application. You applied the concepts and knowledge of servlets gained over the past two days and developed the AirlineTicketBookingServlet, which is the controller servlet for the MVC application.

In the next two days you will be studying another Web technology supported by WebLogic Server: JavaServer Pages.



Sams Teach Yourself BEA WebLogic Server 7. 0 in 21 Days
Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days
ISBN: 0672324334
EAN: 2147483647
Year: 2002
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net