Managing web.xml in WebCenter Portal

Official documentation for modifing the JEE web.xml descriptor in WebCenter Portal PS7 (WebCenter Spaces PS1-PS6) has the following information:

Official documentation for PS1-PS6: Unpack webcenter.ear and manually modify web.xml.
Official documentation for PS7: Doesn't say anything about how to modify web.xml. It only shows the parameters that may be changed.

What can happen when modifying web.xml descriptor file manually?

Changes to web.xml are lost after applying a patch or upgrade to WebCenter Portal.

What is the best practice if you want to modify the web.xml file?

The web.xml file can be modified using the extension application WebCenter Spaces / Portal.

Depending on the WebCenter version

WebCenter Spaces (now called Portal) PS1-PS6 (11.1.1.1-11.1.1.7)

  • In the DesignWebCenterSpaces application, add the web.xml file as a resource in the deployment of the extension of WebCenter Spaces.

3

  • In the WebCenterSpacesExstensionLibrary project, access to the Deployment Profile called custom_webcenter_spaces_war
  • In File Groups -> Web Files -> Filters, check web.xml

2

The web.xml file will be shown in the project and can be deployed within the extended library. Now we can add / override context parameters or add custom servlets.

4

TIP: When adding technologies or dependencies to the project, web.xml can be filled automatically with filters and more elements. You must keep this file clean with just the new / overwritten information. If you have extra content then re-deployment ANT Scripts will fail and Spaces will not work properly.

WebCenter Portal (formerly Spaces) PS7 (11.1.1.8)

In this version of WebCenter Spaces (now named Portal). JDeveloper Application and Project is included to extend WebCenter Portal.

TIP: To develop portal resources such as templates, page style, content presenter templates - the DesignWebCenterSpaces application must be used. However, the project WebCenterSpacesExstensionLibrary is no longer used in this version to deploy code.

In this case you must create a new application using the new JDeveloper template: WebCenter Portal Server Extension.

5

This template will create two projects (that can be named during the creation).

  • PortalExtension: To add custom code, task flows and beans to WebCenter Spaces.
  • PortalSharedLibrary: Similar to the former WebCenterSpacesExtensionLibrary; however, deployments are now done using JDeveloper Deployment tools and the versioning is managed by manually modifying MANIFEST.MF

Taking a look into PortalSharedLibrary it contains only a MANIFEST.MF file used for versioning of deployments.

6

Where are weblogic.xml and web.xml descriptor?

These files should be generated manually.

To create a weblogic.xml create it as New WebLogic Deployment Descriptor.

7

8

In case of web.xml create it as New Java EE Deployment Descriptor:

9
10

By default, web.xml and weblogic.xml will be part of the deployment. It shouldn't be configured at the deployment profile.

TIP: web.xml file should maintain only the override/new parameters to include to WebCenter Portal. In case it contains rubbish or additional parameters then this will have an affect on the startup of WebCenter Portal.

References:
Official documentation 11.1.1.8

Choose the right CX technology for your business