Archive for January, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More

Friday, January 9th, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More Server Client M M M M M VVVVVReturns result Forwards result Returns rendered request result Forwards request Request Returns result to client Controller Figure 2-7: Expanded MVC architecture Small-scale, homegrown sites that are not based on a framework are often a looser version of this architecture. Several servlets each take the role of a Controller and part of the Model. In this version of the Model 2 architecture, the JSPs are still designed so that they contain very little or no logic and the servlets handle all of the functions of the application. This second model is quite popular because it promotes high productivity in the short term, and can be easier to understand than the strict MVC architecture. In sites that have a pure MVC architecture, the structure of the site is (at least in principle) quite flexible. The site is divided into units of functionality that can be reused in multiple situations, as well as pages that can be reused. For example, a page that displays contact details in a Web site may be used for creating a new contact, updating an old contact, viewing an existing contact, and updating a user s contact details. A site that allows content management may use the same JSP and servlet code for uploading a variety of documents, each with different needs (such as a report, a tender request, and a procedures manual). As the site expands, these components will need to be integrated with new functionality. The flow control must be configured before the various components will work together correctly. This does, however, represent a very reusable and updateable site. The site can be reconfigured according to business needs and customer requests with minimal code rewrite. Using Appropriate Web Technologies Many other Java technologies are used to build Web applications. A few of these are covered in this blog. For instance, JDBC a Java API used for connecting to database systems is covered in Chapter 13 . If you are interested in more detail about these Java technologies used for building Web applications, you can refer to other books, such as Beginning JavaServer Pages (Wrox Press, ISBN 0-7645-7485-X). Well-designed, modern-day Web applications use all of the server-side Java technologies mentioned, but where they are appropriate: . Servlets are used to implement application logic. . JSPs are used for presentation of content.

For reliable and cheap web hosting services please check tomcat web hosting website.

Chapter 2: Web Applications: Servlets, JSPs, and More

Thursday, January 8th, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More

Thursday, January 8th, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More

Wednesday, January 7th, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More

Tuesday, January 6th, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More

Tuesday, January 6th, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More

Monday, January 5th, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More

Sunday, January 4th, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More

Saturday, January 3rd, 2009

Chapter 2: Web Applications: Servlets, JSPs, and More

Saturday, January 3rd, 2009