Modify the default web container configuration
A web container handles requests for servlets, JSP (JSP) files, and other types of files that include server-side code. The web container creates servlet instances, loads and unloads servlets, creates and manages request and response objects, and performs other servlet management tasks. The web server plug-ins, provided by the product, help supported web servers to pass servlet requests to web containers.
If the property to start servlets during application server startup is enabled, part of its startup process calls the Servlet.init method on its servlets when you start the web container. Therefore, when the web container starts and calls the init method, other components such as Naming and Work Load Management might not be fully started yet. As a result, application server related calls may not work because all of the application server components might not be ready yet. Once the application server is 'ready for e-business', it is completely ready. If application server related calls fail during Servlet.init method, we can either:
- Start the servlet manually when the server is ready for e-business instead of starting the servlet upon startup or
- We can choose not to make application server related calls in the servlet's init method.
The web container is created initially with default properties values suitable for simple web applications. However, these values might not be appropriate for more complex web applications.
Your application is considered complex if it requires any of the following features:
- Additional virtual host aliases
- Servlet caching
- Persistent HTTP session support
- Session tracking support with URL rewriting
- Special web container transport chain settings
- Asynchronous or remote dispatching
- No request or response pooling
Make the following configuration changes if we have a complex application:
- In the console, click Servers > Server Types > WebSphere application servers > server_name. Then under web container settings, click on one of the following:
- Web container, if the web application requires a virtual host, other than the default_host, or requires servlet caching.
- Web container transport chains, if we need to reconfigure the HTTP connections.
- If the application handles special client request loads, in the console, click Servers > Server Types > WebSphere application servers > server_name. Then under Additional Properties, click Thread pools to modify the thread pool settings.
- If the application requires global settings for internal servlets for WAR files packaged by third-party tools, in the console, click Servers > Server Types > WebSphere application servers > server_name > Web Container Settings > Web container. Then under Additional Properties, click Custom properties and enter the appropriate custom property.
- (zos) If the application uses transaction class mappings to classify workload, in the console, click Resources > Asynchronous Beans > Work managers > workmanager_name. Then enter the name of the transaction class mapping file in the Default transaction class field.
Subtopics
- Web container settings
Use this page to configure the web container settings.
- Programmatic session cookie configuration collection
Use this page to secure cookies by prohibiting programmatic configuration.
- Web container custom properties
We can configure name-value pairs of data, where the name is a property key and the value is a string value that we can use to set internal system configuration properties. Defining a new property enables you to configure a setting beyond that which is available in the console. The following is a list of some of the available web container custom properties.
- Web module deployment settings
Use this page to configure an instance of web module deployment.
- Context root for web modules settings
Use this page to specify the context root for web modules during or after installation of an application onto a WAS deployment target.
- Environment entries for web modules settings
Use this page to configure the environment entries of Web modules such as servlets and JSP (JSP) files.
- (zos) Web container advanced settings
Use this page to support web container advanced settings. This support includes Network QoS and transaction class mapping
- (zos) Web container inbound transport channel settings
Use this page to view and configure a web container inbound channel transport. This type of channel transport handles inbound web container requests from a remote client.
- Web container troubleshooting tips
- Disable servlet pooling: Best practices and considerations
We might want to disable request and response pooling if the application is creating threads inside of the application or if you are concerned about the web container reusing request and response objects.
- JSP specific web container custom properties
We can configure name-value pairs of data, where the name is a property key and the value is a string value that we can use to set internal system configuration properties. We can define a new property to configure a setting beyond what is available in the console.
Related concepts
Class loaders
Web applications: Resources for learning (zos) Transaction class mapping file entries