Saturday, March 23, 2013


We have seen the following warnings in the WebLogic server log file:
  • WARNING: VERSION_DISPLAY_ENABLED_IN_PRODUCTION_STAGE The setting to enable version display will be ignored because the application is running in production mode.

In this article, we will show you:
  • How to eliminate those warnings from the server log file
  • How to patch web.xml in the StoreFrontModuleNew.ear


To eliminate those warnings, you need to modify the following context parameter in the web.xml file:

<description>Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information.</description>

by changing its value from false to true. Note that parameter
determines whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information or not.

How to Patch web.xml in Java EAR File?

StoreFrontModuleNew.ear is the application deployed in the WebLogic server for our ADF FOD benchmark.  Here is the location of web.xml in the StoreFrontModuleNew.ear file.

To unjar the EAR, you do:
  • jar xvf StoreFrontModuleNew.ear
Before you do that, you create a working directory tmp first.  Then you copy EAR file to the tmp directory and un-jar it there.  Similarly, to unjar StoreFrontWebAppNew.war, you create another working directory tmp2 at its level and copy it into tmp2 directory and un-jar it there.  In the following, we show you the whole sequence of steps:

$cd /scratch/aime1/kjeyaram/
$mkdir tmp
$cd tmp
$cp ../StoreFrontModuleNew.ear .
$jar -xvf StoreFrontModuleNew.ear
$mkdir tmp2
$cd tmp2
$cp ../StoreFrontWebAppNew.war .
$jar xvf StoreFrontWebAppNew.war
$ls -lrt
$cd WEB-INF/
$vi web.xml
$cd ..
$zip -f ../StoreFrontWebAppNew.war WEB-INF/web.xml
$cd ..
$zip -f ../StoreFrontModuleNew.ear StoreFrontWebAppNew.war
$cd ..
$rm -rf tmp

We have used zip command[1] to replace existing web.xml in the zip archive with the following option:

Replace (freshen) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive; unlike the update option (-u) this will not add files that are not already in the zip archive.
Note that you can also use jar command as follows:

  • jar uf ../StoreFrontWebAppNew.war WEB-INF/web.xml


1 comment:

Blogger said...

BlueHost is the best hosting company for any hosting plans you require.