Wednesday, August 10, 2011

How to Enable Automatic Compilation of JSP pages in R12 Environment

In Release 11i, the deployment of a (custom) JSP was done as follows:
  1. Copy the file (for example: custom.jsp) to the web tier in the $OA_HTML directory.
  2. Request it in the browser like URL> http://:/OA_HTML/custom.jsp.
The result on the web tier is that:
  • The custom.jsp was compiled
  • Output files of the compilation _custom.class (and _custom.java) are saved under the _pages directory
  • The custom.jsp page is shown in the browser
Performing the same steps in Release 12 environment just shows a blank screen and no compilation of the custom.jsp is done. The steps in this Note explain how the same behavior as in Release 11i can be achieved in Release 12.

Solution

In Release 12 the (automatic) compilation of a JSP is disabled and, at runtime, only the pre-compiled JSP's are picked up. Since this requires fewer checks to be done, the performance is improved and therefore this is the recommended and default setting for a Production environment where JSP's will only be replaced occasionally.

In cases where development activities are done and JSP pages are changing often this default setting makes things more complicated. Each time a JSP is deployed a manual compilation using the ojspCompile.pl is needed and the OC4J running the oacore needs a restart to pick up the changes. This will also affect other people working on the same environment.

Follow the steps below to:
  • Automatically have the JSP recompiled when the JSP is changed (at least the time stamp)
  • See the new JSP without the need to restart the OC4J running oacore
The objective is to change the setting for main_mode from justrun to recompile in
$INST_TOP /ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml

This can be achieved by performing the following:

  • Login into E-Business suite and select System Administrator responsibility
  • Select function AutoConfig (under Oracle Applications Manager) (*)
  • For each web tier server perform the following:
    • Click on pencil icon under Edit Parameters
    • Select tab System
    • Expand section jtff_server
    • Change value for the entry s_jsp_main_mode from justrun to recompile
    • Confirm the change by clicking Save button
  • Run AutoConfig to propagate the changes to the configuration files
  • Verify that the $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml has the following:
      

main_mode
recompile
  • Restart the web tier services
  • Request a JSP in the browser which is compiled. See that a new _.class is created in _pages
  • Make a change in the JSP file
  • Request it again in the browser. See that _.class is 'refreshed' in _pages and the change is seen in the browser

(*) If the Autoconfig function is not available it can also be accessed by selecting other function for Oracle Application Manager and then select Site Map > System Confiration - Autoconfig. Also the Autoconfig function can be added to the menu as follows:

  • Log in as System Administrator and select System Administrator
  • Application>Menu
  • Put the system into query\
  • In Menu enter OAM_ADMIN_MENU
  • Run the query: This should return Oracle Applications Manager Administrator menu
  • Add new line
  • Enter Prompt = Autoconfig + Function select OAM_AD_CONFIG_FILES_TABLE and ensure Grant is ticked
  • Save
  • After recompilation (and possibly bounce) the new function will be available to be used in the future

Metalink#458338.1

No comments:

Post a Comment