Servlets are packaged in Web module .war files.
- Dynamic Web page content
- Provide database access
- Serve multiple clients at one time
- Filter data
HTTP servlets serve Web-based clients.
We can define servlets as welcome files. Non-servlet resources are served only when the fileServingEnabled attribute is set to true in the IBM extensions XMI file...WEB-INF/ibm-web-ext.xmi
Serving welcome files is connected to serving static content. Therefore the fileServingEnabled attribute is set in the Web module.
The servlet context defines the server view of the Web app within which the servlet is running and is used to...
- Log events
- Obtain URL references to resources
- Set and store attributes for other servlets such as the e-mail address for the Webmaster.
The Web container uses the URI from requests, minus the context path, as the path to map to a servlet. The container chooses the longest matching available context path from the list of Web apps that it hosts.
Related tasksDevelop servlets with WAS extensions Web apps: Links