IBM Support

web.xml description and functionality

Troubleshooting


Problem

web.xml description and functionality

Symptom

PART: Distributed Order Management 7.3 Platform
DATABASE: Oracle - 9.2.0.4
WEB SERVER: WebLogic - 8.1 SP3
WEB BROWSER: Internet Explorer - 6.0 sp1

Problem Description:
--------------------------------

This solution is created to describe the components, functionality and impact of web.xml on Yantra.

Cause

Resolving The Problem

Brief overview of Web Application:
-------------------------------------------------------

A Web Application contains an application's resources, such as servlets, JavaServer Pages (JSP), JSP tag libraries, and static resources such as HTML pages and image files. A Web Application can also define links to resources outside of the application such as Enterprise JavaBeans (EJBs).
In this case, web application is Yantra (73HF14) and application server is Weblogic 8.1 SP3

What is web.xml?
-----------------------------

Web.xml is a standard J2EE deployment descriptor that is used to deploy a web application on an application server. In this we register servlets, define servlet initialization parameters, register JSP tag libraries, define security constraints, and define other Web Application parameters.

Components of web.xml:
---------------------------------------

<context-param> - This element declares servlet context initialization parameters for a Web Application. These are parameters that you define and are available throughout your Web application.

<listener> - This element defines an application listener. A listener class responds to the web application events.

<servlet> - This element defines servlet used in the application. If a jsp-file is specified and the <load-on-startup> element is present, then the JSP is precompiled and loaded when WebLogic Server starts in the order of value given in <load-on-startup>.

<servlet-mapping> - After all the servlets are defined, they need to be mapped to the URL pattern. The portion of the URL after the http://host:port + WebAppName is compared to the <url-pattern> by WebLogic Server. If the patterns match, the servlet mapped in this element will be called.

<session-config> - The number of minutes after which sessions in this Web Application expire. The value set in this element overrides the value set in the TimeoutSecs parameter of the <session-descriptor> element in the WebLogic-specific deployment descriptor weblogic.xml

<mime-mapping> - Defines a mapping between an extension and a mime type. (MIME = Multipurpose Internet Mail Extensions)

<welcome-file-list> - This element contains an ordered list of welcome-file. elements.


Functionality:
----------------------

Once all the components are defined, the application is deployed on to the server. The configuration is taken up from the descriptor files, web.xml and weblogic.xml. For rest of the configuration that are not defined in the descriptor files default values are used.

Impact on the system:
---------------------------------

The definitions provided in web.xml directly impact the web application. For example, if we miss out any servlet name then that servlet is not loaded when it is called.

Ex: If we remove WMSPackStrategyAPI servlet from web.xml and deploy Yantra on Weblogic server, FileNotFound Exception will appear in the configurator when we try to view Pack Planning details. (Applications -> Warehouse Management -> Packing -> Pack Planning)

General findings:
---------------------------

-- To apply any changes done in web.xml, we have to redeploy Yantra on the Weblogic server.
-- When we apply the changes done from the Weblogic Console, Yantra is automatically redeployed and the changes are reflected back to the descriptor files.
-- Weblogic picks up the descriptors files placed under <YFS_HOME>/webpages/WEB-INF folder.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

PRI49601

Product Synonym

[<p><b>]Fact[</b><p>];

Document Information

Modified date:
16 June 2018

UID

swg21546568