We can edit web.xml for ADF application and Portal
framework application directly in the JDeveloper. But, if we want to make any
configuration changes for webcenter Portal (Ealry known as : Webcenter Spaces),
we can edit in the webcenter.ear file.
We might require to edit web.xml for below usecases.
1.
Configure Session
timeout
2.
Change the check file
modification to true for reflecting the adf changes.
3.
Disabling the content
compression to reflect the skinning changes
<session-config>
<session-timeout>10</session-timeout>
</session-config>
<context-param>
<description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
<param-name>org.apache. myfaces.trinidad.CHECK_FILE_ MODIFICATION</param-name>
<param-value>true</param- value>
</context-param>
<description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
<param-name>org.apache.
<param-value>true</param-
</context-param>
<context-param>
<param-name>oracle.
<param-value>true</param-
</context-param>
Webcenter.ear
file path
<WEBCENTER_HOME>\archives\ applications\webcenter.ear
Example :
Windows
C:\Oracle\Middlewar_Home\ Oracle_WC1\archives\ applications
Linux
/u01/app/oracle/product/fmw11g/Oracle_WC1/archives/applications
Steps
1. Copy
the webcenter.war as backup. Sometimes, while restarting the server it will
redirect to the error page due to the webcenter 11.1.1.4.0 in prepared stage.
2. Open
webcenter.ear file.
3. Edit
web.xml and update the entries.
4. Repack
the webcenter.ear file.
5. Restart
the webcenter Portal server (WC_Spaces)
We
can extract the ear file unpack the file in two ways.
Option
1:- Linux
1. Create
the temporary folder in the linux machine and extract it.
a. #mkdir
/tmp/webcenterear
b. #cd
/tmp/webcenterear
c. #cd
/u01/app/oracle/product/fmw11g/Oracle_WC1/archives/applications/
d. #cp webcenter.ear /tmp/webcenterear
e. #cd
/tmp/webcenterear
f.
#jar –xvf webcenter.ear
g. #mkdir
war
h. #jar
–xvf ../spaces.war
2. Edit
web.xml file
3. Unpack
the webcenter.ear after editing the files
a. #cd
/tmp/webcenterear
b. #jar -cvf ../spaces.war *
c. #cd ..
d. #rm -rf war
e. #jar -cvf
../webcenter.ear *
4. Copy paste the the webcenter.ear file to the
Webcenter Path.
a. #cp webcenter.ear /u01/app/oracle/product/fmw11g/Oracle_WC1/archives/applications/
5. Restart
the WC_Spaces managed server
Option
2 : Windows
1. Copy
paste the webcenter.ear file
2. Open
webcenter.ear with 7 zip tool
3. Open
the spaces.war
4. Edit
web.xml and add the entries in 7 zip explorer
5. Save
the web.xml file, spaces.war and webcenter.ear file without repacking the file
6. Copy
paste the file in the respective folder
7. Restart
the webcenter space