Troubleshooting: Changes to WebSphere WEB.XML file not taking effect
Symptom
Changes you make to the web.xml
file are not getting saved. This issue may manifest itself in many ways.
One example of the problem are run-time errors when a user clicks the Manage Rules tab or the Used by App Portal tabs in the portal:
A Runtime error has occurred. Do you wish to Debug?
Line: 411
Error: 'null' is null or not an object
The server must be configured to work with SVG files to display the Flow Explorer. This setting is stored in the web.xml
file, and although the server was configured, the setting was not working.
Solution
Resolution
When the EAR file is deployed in WebSphere, the web.xml file is stored in the WEB-INF directory:
WebSphereinstallroot /AppServer/installedApps/ servername/ applicationname .ear/ contextroot .war/ WEB-INF/web.xml
Example:
c:/WebSphere/AppServer/installedApps/myserver/PegaRULES.ear/prweb.war/ WEB-INF/web.xml
WebSphere copies the web.xml file to another location in the installation, so there are two web.xml files present: one in the EAR file deployment, and one deep within the WebSphere configuration.
Process Commander updated the web.xml file in the WEB-INF directory (where Process Commander expects to find the file), but WebSphere was using the other file. Therefore, any changes that Process Commander made to this file were not being seen by WebSphere.
To ensure that the web.xml file in the WEB-INF directory is the only file used by the system, enable the Use Metadata from Binaries flag in the WebSphere configuration:
- Start WebSphere on the server and then open the Administrative Console.
- Click the + next to Applications, and then click Enterprise Applications.
- Click the PegaRULES application name in the Enterprise Applications list. The Configuration tab appears:
- Verify that the Use Metadata from Binaries property is checked. If it is not, check the box and then click Apply at the bottom of the window. Save the change by following the prompts.
This setting may also be enabled in the Installation process itself. When preparing to Install a new application, when deploying the EAR file, the check the setting Use Binary Configuration:
See the Install Guide 4.2 for full details on deploying an EAR File in WebSphere.