Thursday, 12 April 2012

Custom jsp file in Oracle EBS R12


                                 
In Oracle EBS 11i, we have automatic compilation of jsp files. Hence the deployment of a custom jsp file was easy as mentioned below:

1.       Copy the custom jsp file to $OA_HTML directory of the web tier.
2.       So as to access the custom.jsp file, use the URL : http://<myhost.mydomain>:<port>/OA_HTML/custom.jsp.


How does this work:

 The Custom jsp file gets compiled on the web tier and it creates the output files as  _custom.class (and _custom.java) are saved under the _pages ( Under $COMMON_TOP) directory.


Think of performing the same steps in Oracle EBS R12?

You would get a blank page because the custom jsp file will not be compiled since automatic compilation of a jsp on runtime is disabled in Oracle EBS R12. Only the precompiled jsp are picked up in R12.
This has been deployed keeping performance factor into consideration.

However it becomes very difficult in a scenario where the development team keeps updating with new custom jsp files to the instance. 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.

Please look into the below entry of an Oracle EBS R12 context file entry for s_jsp_main_mode:
  
<jsp_debug_parameters oa_var="s_jsp_main_mode">justrun</jsp_debug_parameters>



The file: $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml
Will also have the justrun entry as seen below:

  <init-param>
         <param-name>main_mode</param-name>
         <param-value>justrun</param-value>
      </init-param>


To Enable Automatic Compilation of JSP pages in R12 Environment:

1.     Shutdown all application services.
2.     Change the entry s-jsp_main_mode in contextfile from justrun to recompile.
3.     Run autoconfig.
4.     Verify the changes in $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml.
5.     Start all application services.


This can also eb achieved through the Oracle recommended way:

  • 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:
      <init-param>
         <param-name>main_mode</param-name>
         <param-value>recompile</param-value>
      </init-param>
  • Restart the web tier services
  • Request a JSP in the browser which is compiled. See that a new _<jspname>.class is created in _pages
  • Make a change in the JSP file
  • Request it again in the browser. See that _<jspname>.class is 'refreshed' in _pages and the change is seen in the browser
Reference metalink id: 458338.1

1 comment:

  1. Big data service providers should understand the need of Data, and they should work to build more appropriate services to meet the requirements of their clients.

    ReplyDelete