29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

► A set of initialization parameters for the servlet context object. All the servlets<br />

running in the same Web application have the same servlet context and can<br />

access these attributes.<br />

► Servlet information: For each servlet we will find its name, its fully qualified<br />

class name or the path leading to its file for a JSP, and its parameters for<br />

initialization (these parameters belong to the servlet and will not be shared<br />

with other servlets). We will also find out whether the servlet must be loaded<br />

when the server is started, and a set of mapping rules, allowing a servlet to<br />

respond to requests for a set of URLs.<br />

► A list of default files (welcome pages) to send to the user when the request<br />

does not specify any file in a directory. Typically index.html, index.htm, and<br />

index.jsp may be used here.<br />

► A list of error pages to send to the user when the request generates an error.<br />

HTTP errors or Java errors (exceptions) may be handled in that way.<br />

► JSP and other tag libraries used within the Web application.<br />

► References to external resources and enterprise beans: These references<br />

can then be easily located by the servlets. It can include entries in the JNDI<br />

lookup table, the location of enterprise bean interfaces, or simply a<br />

declaration of an application’s environment entry.<br />

► Security constraints: the access to some resources can be limited and<br />

configured in the deployment descriptor. These resources are grouped into<br />

collections and the constraints are on these collections.<br />

► Any other type of information useful during the deployment to the servlet<br />

container. It may include the description of the application (including if it is<br />

distributable), timeout settings, additional information about mime mapping,<br />

and so on.<br />

The deployment descriptor file enables the application configuration to be<br />

specified independently from the server. It clearly simplifies the deployment<br />

process because the same application can be deployed into different servers<br />

without having to review its content.<br />

A Web deployment descriptor is shown in Example 4-1.<br />

Example 4-1 Web deployment descriptor<br />

<br />

<br />

<br />

OnlineCatalog<br />

<br />

SearchItemMasterView<br />

SearchItemMasterView<br />

62 <strong>IBM</strong> <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> - Express V5.0.2 Developer Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!