Tuesday, August 2, 2011

How to edit web.xml file for WebCenter Spaces11g

Hi,

You might be aware of how to configure session timeout setting in ADF application which resides in web.xml file (in case you don’t then check this post). Then you might be wondering why this guy keep talking about session timeout these days? :)

Well the reason for this is if you are working with ADF application or WebCenter portal application the location of web is /META-INF folder of your application. But if you are extending webcenter spaces application (like we do) then the location of web.xml file for webcenter spaces is packed in webcenter.ear file on weblogic server.

In order to make any change to this file you have to follow these steps as described in the documentation.

Note: These steps are also eligible for webcenter portal application In case you don't want to change settings at design time.

All you need to do is

  1. Open webcenter spaces ear file.
  2. edit web.xml
  3. re-pack the .ear file and the steps are as follows

Steps (Copied from docs):

1. Navigate to your WebCenter Oracle home directory.

2. Open the WebCenter Spaces .EAR file:

$ mkdir -p /tmp/my_ear

$ cd /tmp/my_ear

$ jar -xvf $WEBCENTER_HOME/archive/applications/webcenter.ear

$ mkdir war

$ cd war

$ jar -xvf ../spaces.war

3. Edit WEB-INF/web.xml and save the changes.

4. Create a modified .EAR file with the required web.xml properties

$ cd /tmp/my_ear/war

$ jar -cvf ../spaces.war *

$ cd ..

$ rm -rf war

$ jar -cvf ../webcenter.ear *

5. Copy /tmp/webcenter.ear to $WEBCENTER_HOME/archive/applications/webcenter.ear.

6. Restart the WC_Spaces managed server.

At startup, this automatically deploys the newer application with the modified web.xml.

Hope you find this useful,

Zeeshan Baig

3 comments:

  1. I'm having trouble finding the web.xml file and the correct location of the .ear file - can you please help? These are two the locations I found:


    /u01/app/oracle/product/fmw/Oracle_WC1/archives/applications/webcenter.ear

    /u01/app/oracle/product/fmw/user_projects/domains/test_wc_domain/config/deployments/webcenter.ear

    ReplyDelete
  2. You can verify from weblogic console the correct location of webcenter.ear

    The default location is /u01/app/oracle/product/fmw/Oracle_WC1/archives/applications/webcenter.ear

    Go to weblogic console > deployments > click on webcenter.ear and check the location

    Hope it helps
    ZB

    ReplyDelete