Chapter 2. Web Applications
In this chapter, we’ll begin writing the JAW Motors application. First, we’ll explain some basic architectural principles like the MVC pattern of web development. Then we’ll explore the building blocks of the web tier (JSP, JSTL, CSS, and servlets). Finally, we’ll use ANT to create WAR files and deploy them to JBoss.
Our goal is not to teach you these technologies and techniques from scratch—they should be familiar to most web developers already. This chapter is meant to be a quick overview and demonstration of the technology working in JBoss. For deeper look into web tier software and development best practices, look at Head First Servlets & JSP, by Bryan Basham, Kathy Sierra, and Bert Bates (O’Reilly).
The Servlet Container
The servlet container is the core J2EE technology that powers the web tier. It is considered a container because JSPs and servlets cannot run as standalone applications—they must implement special interfaces and run “inside” the container. The container listens for HTTP requests on a given port, hands the incoming data to your custom components, and uses the resulting output to create a well-formed HTML document to return to the web browser as the response.
The JBoss developers wisely chose not to create their own servlet container to meet this need. A number of excellent ones already are out there. Rather than recreating the wheel, JBoss allows you to integrate the servlet container of your choice.
Tomcat 5.5.9 is the default servlet ...
Get JBoss at Work: A Practical Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.