Tuesday, September 9, 2008

Enable Automatic Compilation of JSP pages in R12 Environment

In Release 12 the (automatic) compilation of JSP is disabled and on runtime only the pre-compiled JSP's are picked up. Since this requires less checks to be done the performance is improved. Therefor is this the recommended 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 being recompiled when JSP was 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 any one of the following:

a. Using Autoconfig:

1. Backup the context file (echo $CONTEXT_FILE) before editing it and Change value for the entry s_jsp_main_mode from justrun to recompile.

2. Run Autoconfig to propagate the changes to the configuration files.

3. Verify that now the $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml has

" init-param

param-name main_mode /param-name
param-value recompile /param-value
/init-param> "

4. Restart the Middle Tier services and access the applications to load JSP's which will cause them to be recompiled on the run.

5. After successfully accessing the applications, use the vi editor to edit the $CONTEXT_NAME.xml context file used by AutoConfig and revert the value for "s_jsp_main_mode" to "justrun" (without the double quotes) in order not to hamper the performance of your system.

6. Run AutoConfig to propagate the changes.

b. Using Context Editor

1. Login into E-Business suite and select System Administrator responsibility

2. Select function AutoConfig (under Oracle Applications Manager)

3. For each MT server perform the following:

4. Click on pencil icon under Edit Parameters

5. Select tab System

6. Expand section jtff_server

7. Change value for the entry s_jsp_main_mode from justrun to recompile

8. Confirm the change by clicking Save button

9. 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

" init-param
param-name main_mode /param-name
param-value recompile /param-value
/init-param> "


10. Restart the Middle Tier services 11. Request a JSP in the browser which is compiled. See that a new _.class is created in _pages

12. Make a change in the JSP file 13. Request it again in the browser. See that _.class is 'refreshed' in _pages and the change is seen in the browser

Ref Notes #

467562.1 - Blank Page Accessing R12 - 'Missing class: _RF' in OACore application.log
433386.1 - JSP Pages Hanging in R12 After Removing Cached Class Files in _pages