+

Search Tips   |   Advanced Search

 

Introduction: Web applications

 

Explore the key concepts pertaining to Web applications. Web applications are comprised of one or more related files that you can manage as a unit, including HTML files, servlets, and Java ServerPages files. IBM extensions to the JSP specification make it easy for HTML authors to add the power of Java technology to Web pages, without being experts in Java programming.

Web applications

A Web application is comprised of one or more related servlets, JavaServer Pages technology (JSP files), and Hyper Text Markup Language (HTML) files that you can manage as a unit.

Servlets

Servlets are Java programs that use the Java Servlet Application Programming Interface (API). You must package servlets in a WAR file or Web module for deployment to the appserver. Servlets run on a Java-enabled Web server and extend the capabilities of a Web server, similar to the way applets run on a browser and extend the capabilities of a browser.

Application life cycle listeners and events

With application life cycle listeners and events, which are now part of the Servlet API, you can notify interested listeners when servlet contexts and sessions change. For example, you can notify users when attributes change and if sessions or servlet contexts are created or destroyed.

Servlet filtering

Servlet filtering provides a new type of object called a filter that can transform a request or modify a response. You can chain filters together so that a group of filters can act on the input and output of a specified resource or group of resources.

Page lists

Page lists allow you to avoid hard-coding Uniform Resource Locators (URLs) in servlets and JSP files. A page list specifies the location where a request is to be forwarded, but automatically customizes that location depending on the MIME type of the servlet. Use these properties to specify a markup language and an associated MIME type. For the given MIME type, you also specify a set of pages to invoke.

Client type detection support

In addition to providing the page list mapping capability, the PageListServlet also provides Client Type Detection support. A servlet determines the markup language type that a calling client needs in the response, using the configuration information in the client_types.xml file.

autoRequestEncoding and autoResponseEncoding

Starting with WAS V5, the Web container no longer automatically sets request and response encodings, and response content types. Programmers are expected to set these values using available methods in the Servlet 2.3 Specification or later. If programmers choose not to use the character encoding methods, they can specify the autoRequestEncoding and autoResponseEncoding extensions, which enable the appserver to set the encoding values and content type.

JavaServer Pages

JavaServer Pages are application components coded to the JavaServer Pages Specification. JavaServer Pages enable the separation of the Hypertext Markup Language (HTML) code from the business logic in Web pages so that HTML programmers and Java programmers can more collaborate in creating and maintaining pages.

JavaServer Faces widget library (JWL)

JavaServer Faces widget library (JWL) is a widget library. Customers that do not use Rational Application Developer can use the JWL widget library to write their own Web applications that are hosted by WebSphere Application Server. When you use the JWL widget library, you do not need to move the Java Archive (JAR) files from the development environment to the runtime environment or package the widget library with each application.

Web modules

A Web module represents a Web application. A Web module is created by assembling servlets, JavaServer Pages files, and static content such as Hypertext Markup Language (HTML) pages into a single deployable unit. Web modules are stored in WAR files, which are standard Java archive files.

Security constraints

Security constraints determine how Web content is to be protected. These properties associate security constraints with one or more Web resource collections. A constraint consists of a Web resource collection, an authorization constraint and a user data constraint.

File serving

File serving allows a Web application to serve static file types, such as HTML. File-serving attributes are used by the servlet that implements file-serving behavior.

Remote request dispatcher

Remote Request Dispatcher (RRD) is a pluggable extension to the Web container that allows application frameworks, servlets and JavaServer Pages to include content from outside of the current executing resource’s Java virtual machine (JVM) as part of the response sent to the client.

Application extension registry filtering

The extension registry exposes the registry filter extension point. The registry filter removes elements within the extension registry for client applications. Extensions that are attached to the registry filter extension point and that also implement this interface are called as necessary when a client operates on a named registry instance that matches the target specification.

Application extension registry

WAS has enabled the Eclipse extension framework for applications to use. Your applications are extensible as soon as you define an extension point and provide the extension processing code for the extensible area of the application. You can also plug an application into another extensible application by defining an extension that adheres to the target extension point requirements. The extension point can find the newly added extension dynamically and the new function is seamlessly integrated in the existing application. It works on a cross Java 2 Platform, Enterprise Edition (J2EE) module basis. The application extension registry uses the Eclipse plug-in descriptor format and APIs as the standard extensibility mechanism for WebSphere applications. Developers who build WebSphere application modules can use WAS extensions to implement Eclipse tools and to provide plug-in modules to contribute functionality such as actions, tasks, menu items, and links at predefined extension points in the WebSphere application.

Sessions

A session is a series of requests to a servlet, originating from the same user at the same browser.

Session management support

WAS provides facilities, grouped under the heading Session Management, that support the javax.servlet.http.HttpSession interface described in the Servlet API specification.

Distributed sessions

WAS provides database session persistence and memory-to-memory session replication in a distributed environment.

Memory-to-memory replication

WAS supports session replication to another WebSphere Application Server profile. This support is referred to as memory-to-memory session replication. In this mode, sessions can replicate to one or more WebSphere Application Server profiles to address HTTP Session single point of failure (SPOF).

Memory-to-memory session partitioning

Session partitioning gives the administrator the ability to filter or reduce the number of destinations that the session object gets sent to by the replication service. You can also configure session partitioning by specifying the number of replicas on the replication domain. The Single replica option is chosen by default. Since the number of replicas is global for the entire replication domain, all the session managers connected to the replication domain use the same setting.

Base in-memory session pool size

The base in-memory session pool size number has different meanings, depending on session support configuration.



 

Related information


Learn about Web applications