Chapter 11. Web App Deployment: Deploying your web app

image with no caption

Finally, your web app is ready for prime time. Your pages are polished, your code is tested and tuned, and your deadline was two weeks ago. But where does everything go? So many directories, so many rules. What do you name your directories? What does the client think they’re named? What does the client actually request, and how does the Container know where to look? How do you make certain that you don’t accidentally leave out a directory when you move the whole web app to a different machine? What happens if the client requests a directory instead of a specific file? How do you configure the DD for error pages, welcome files, and MIME types? It’s not as bad as it sounds...

OBJECTIVES

Web Application Deployment

2.1

Construct the file and directory structure of a web application that may contain (a) static content, (b) JSP pages, (c) servlet classes, (d) the deployment descriptor, (e) tag libraries, (f) JAR files, and (g) Java class files. Describe how to protect resource files from HTTP access.

2.2

Describe the purpose and semantics for each of the following deployment descriptor elements: error-page, init-param, mime-mapping, servlet, servlet-class, servlet-mapping, servlet-name, and welcome-file.

2.3

Construct the correct structure for each of the following deployment descriptor elements: error-page, init-param, mime-mapping, servlet, servlet-class, servlet-name, and welcome-file.

2.4

Explain the purpose of a WAR file and describe the contents of a WAR file and how one may be constructed.

6.3

Write a JSP Document (XML-based syntax) that uses the correct syntax.

Coverage Notes:

This objective has been covered throughout the book in other chapters, so most of the content in this chapter related to this objective is either for review or to look at something in a little more detail.

Objectives 2.2 and 2.3 focus mainly on picky XML tag details related to the Deployment Descriptor. While this is probably the least fun part of the book (and the exam), most of this content is easy to understand and it’s just a matter of memorizing the tags.

There is one tricky part, though, and we’ll spend most of our time on it—servlet mapping.

We decided to stick this objective into this chapter for two reasons: 1) most of this chapter has to do with XML, and 2) we didn’t want to add anything else into the JSP chapters. We decided it was better for you to concentrate more on the syntax and behavior of all the other parts of JSP, rather than also worrying about the XML versions of everything. But now that you’re, you know, an expert... we figure you can handle it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset