One-stop shop to Compile JSPs in 11i, r12.1 and r12.2


Introduction –

Seasoned DBAs are already aware about architectural changes in 11i, r12 and r12.2. Likewise, there are some significant changes when you compile jsp pages in these versions. This article will cover important aspects when performing same action in different versions. We will start with 11i until r12.2 followed by a summary on differences and similarities.

JSP Cache

-          It is compiled version of JSP files.
-          They have extension .class.
-          They are stored in folder - _pages.



Compilation process of jsp file

JSP file ---conversion---> .java file ---compilation---> .class file


Differences when storing compiled .class files

In 11i, Apache JServe was responsible to compile jsp and convert the same into .class file while in r12, we have oc4j handling jsps.

Default location of compiled .class files
Release
Location
Prior 11i
$OA_HTML/_pages
11i
$COMMON_TOP/_pages
12.1
$COMMON_TOP/_pages
12.2
$EBS_APPS_DEPLOYMENT_DIR/oacore/html/WEB-INF/classes/_pages

Differences when locating perl script ojspCompile.pl

Default location of perl script ojspCompile.pl
Release
Location
11i
$JTF_TOP/admin/scripts
12.1
$FND_TOP/patch/115/bin
12.2
$FND_TOP/patch/115/bin

Differences when locating source jsp files

Default location of jsp source files
Release
Location
11i
$COMMON_TOP/html
12.1
$COMMON_TOP/webapps/oacore/html
12.2
$EBS_APPS_DEPLOYMENT_DIR/oacore/html 


Differences in nomenclature for .class files

Difference in naming convention for .class files
Release
JSP file
Class file
11i
AppsLocalLogin.jsp
_AppsLocalLogin.class
12.1
AppsLocalLogin.jsp
_AppsLocalLogin.class
12.2
AppsLocalLogin.jsp
__appslocallogin.class


One more significant change from r12.1 to r12.2 is Oracle 10g Application Server in 12.1.x has now been replaced by Oracle Fusion Middleware 11g.
We have WebLogic Admin manager and node manager that will now be managing oacore, forms and oafm as managed servers.
Prior to r12.2 they were part of opmn(Oracle Process Manager).
Above factors will play vital role in understanding steps to compile jsps in 3 versions later discussed in this article.

Steps to compile jsps

We use same script - ojspCompile.pl to compile jsps in all versions. However, location has changed, and steps have been summarized below.
I follow BBYM approach when performing any activity that involves files being modified manually or being modified by scripts.
Obviously, BBYM simply stands for 'Backup Before You Modify' :)


                                                   Oracle EBS 11i

                                             Compile Single JSP in Oracle ebs 11i
                                             Compile all JSP files in Oracle ebs 11i

                                                  Oracle EBS r12.1

                                             Compile Single JSP in Oracle ebs r12.1
                                             Compile all JSP files in Oracle ebs r12.1

                                                  Oracle EBS r12.2

                                             Compile Single JSP in Oracle ebs r12.2
                                             Compile all JSP files in Oracle ebs r12.2



References -

- 12.2 E-Business Suite JSP Page Handling, File Locations, Manual Compilation, And The Allowed JSP Features (Doc ID 1928874.1)
- Pythian Blogs


Compile all JSP files in Oracle ebs r12.2


Before you start compiling jsps and following below steps, I recommend understanding some key differences between 11i, r12.1 and r12.2 when it comes to compiling jsps. Please follow below link and then proceed further -


1. Take a backup of _pages directory that will be modified due to jsp compilation -

$ cd $EBS_APPS_DEPLOYMENT_DIR/oacore/html/WEB-INF/classes/
$ cp -R _pages _pages29dec2019
$ ls -ld _pages*
drwxr-xr-x 5 applmgr oinstall 249856 Dec 29 16:36 _pages
drwxr-xr-x 5 applmgr oinstall 249856 Dec 29 16:56 _pages29dec2019

2. Stop apache, oacore and oafm services -
adapcctl.sh stop
admanagedsrvctl.sh stop oacore_server1
admanagedsrvctl.sh stop oafm_server1

3. Compile the jsps manually using the below command -
$ cd $FND_TOP/patch/115/bin/
$ perl $FND_TOP/patch/115/bin/ojspCompile.pl --compile --flush -p            

4. Check class file last modification date as follows -

$ cd $EBS_APPS_DEPLOYMENT_DIR/oacore/html/WEB-INF/classes/_pages
$ ls -ltr | tail
-rw-r--r-- 1 applmgr oinstall  13669 Dec 29 17:14 __papost.class
-rw-r--r-- 1 applmgr oinstall   9942 Dec 29 17:14 __pasmtupost.class
-rw-r--r-- 1 applmgr oinstall   9921 Dec 29 17:14 __pauppost.class
-rw-r--r-- 1 applmgr oinstall   7015 Dec 29 17:14 __paynopdf.class
-rw-r--r-- 1 applmgr oinstall   9486 Dec 29 17:14 __paynoxml.class
-rw-r--r-- 1 applmgr oinstall   8350 Dec 29 17:14 __pyshsimpslp.class
-rw-r--r-- 1 applmgr oinstall   7153 Dec 29 17:14 __peruspdftemplate.class
-rw-r--r-- 1 applmgr oinstall   7015 Dec 29 17:14 __pergbrti.class
-rw-r--r-- 1 applmgr oinstall  13248 Dec 29 17:14 __createwavebookmarkable.class
drwxr-xr-x 2 applmgr oinstall     45 Dec 29 17:14 _txkcsa

5. Start oacore,oafm and Apache-

admanagedsrvctl.sh start oacore_server1
admanagedsrvctl.sh start oafm_server1
adapcctl.sh start
6. Clear your web browser cache

Compile Single JSP in Oracle ebs r12.2


1. Take a backup of .class file that will be modified due to jsp compilation -
$ cd $EBS_APPS_DEPLOYMENT_DIR/oacore/html/WEB-INF/classes/_pages
Unlike r12.1, there is a different naming convention here in r12.2 with additional '_' being prefixed like as follows –
$ ls -ltr _jtffmxrg.class
ls: cannot access _jtffmxrg.class: No such file or directory
$ ls -ltr __jtffmxrg.class
-rw-r--r-- 1 applmgr oinstall 69675 Sep 16 19:13 __jtffmxrg.class
Also, all .class files are in lower-case while in earlier r12.1, they were same filenames with simply an '_' prefixed.

Example –
In r12.1
$ ls -ltr *OA.class*
-rw-r--r-- 1 applprod proddba 8843 Dec 29 11:32 _OA.class

In r12.2
$ ls -ltr *OA.class*
ls: cannot access *OA.class*: No such file or directory
$ ls -ltr *oa.class*
-rw-r--r-- 1 applmgr oinstall 10123 Sep 16 19:13 __oa.class
-rw-r--r-- 1 applmgr oinstall 12874 Sep 16 19:13 __jtfwtpoa.class

2. Check for last compilation time for .class file as follows -
$ cd $COMMON_TOP/_pages
$ ls -ltr __jtffmxrg.class

3. Your JSP file that will be compiled is stored under location -  $EBS_APPS_DEPLOYMENT_DIR/oacore/html
$ cd $EBS_APPS_DEPLOYMENT_DIR/oacore/html
$ ls -ltr jtffmxrg.jsp
-rw-r--r-- 1 applmgr oinstall 33875 Sep 16 19:13 jtffmxrg.jsp

Please note that above file will be used as reference to generate class (__jtffmxrg.class) file under - $EBS_APPS_DEPLOYMENT_DIR/oacore/html/WEB-INF/classes/_pages


2.To compile JSP file, perl utility - ojspCompile.pl is located under -
$FND_TOP/patch/115/bin/
ojspCompile.pl uses "-s" option to compile single jsp.

$ cd $FND_TOP/patch/115/bin/
$ perl -x $JTF_TOP/admin/scripts/ojspCompile.pl --compile -s jtffmxrg.jsp



3. Check class file last modification date as follows -
$ cd $EBS_APPS_DEPLOYMENT_DIR/oacore/html/WEB-INF/classes/_pages
$ ls -ltr __jtffmxrg.class
-rw-r--r-- 1 applmgr oinstall 69607 Dec 29 16:36 __jtffmxrg.class

4. Bounce below services –
adapcctl.sh stop
admanagedsrvctl.sh stop oacore_server1
admanagedsrvctl.sh stop oafm_server1

admanagedsrvctl.sh start oacore_server1
admanagedsrvctl.sh start oafm_server1
adapcctl.sh start

5. Clear your web browser cache

Compile all JSP files in Oracle ebs r12.1


1. Take a backup of _pages directory that will be modified due to jsp compilation -
$ cd $COMMON_TOP/
$ cp -R _pages _pages23dec2019
$ ls -ld _pages*
drwxr-xr-x 5 applprod proddba 405504 Dec 23 09:13 _pages
drwxr-xr-x 5 applprod proddba 405504 Dec 29 11:28 _pages29dec20192

2. Stop application opmn services -
./adopmnctl.sh stopall

3. Compile the jsps manually using the below command -
$ cd $FND_TOP/patch/115/bin/
$ perl $FND_TOP/patch/115/bin/ojspCompile.pl --compile --flush -p 4          

4. Check class file last modification date as follows -

$ cd $COMMON_TOP/_pages
$ ls -ltr | tail
-rw-r--r-- 1 applprod proddba  77656 Dec 29 11:33 _bisalrta.class
-rw-r--r-- 1 applprod proddba  47949 Dec 29 11:33 _bicsbadd.class
-rw-r--r-- 1 applprod proddba 107558 Dec 29 11:33 _asfAdminCalTypesMain.class
-rw-r--r-- 1 applprod proddba  41983 Dec 29 11:33 _amsStratDtailFrm.class
-rw-r--r-- 1 applprod proddba   9498 Dec 29 11:33 _amsProflFundTbl.class
-rw-r--r-- 1 applprod proddba  12538 Dec 29 11:33 _amsProdCatAssignmentTbl.class
-rw-r--r-- 1 applprod proddba  12262 Dec 29 11:33 _amsCodeDefinitionOverTbl.class
-rw-r--r-- 1 applprod proddba  53302 Dec 29 11:33 _amscmsgl.class
-rw-r--r-- 1 applprod proddba   5973 Dec 29 11:33 _ahlvwpTaskTreeDisplay.class
drwxr-xr-x 2 applprod proddba   4096 Dec 29 11:33 _txkcsa


4. Start opmn services -

./adopmnctl.sh startall

6. Clear your web browser cache

Compile Single JSP in Oracle ebs r12.1


1. Take a backup of .class file that will be modified due to jsp compilation -
$ cd $COMMON_TOP/_pages
$ ls -ltr _jtffmxrg.class
$ cp _jtffmxrg.class _jtffmxrg.class23dec2019

2. Check for last compilation time for .class file as follows -
$ cd $COMMON_TOP/_pages
$ ls -ltr _jtffmxrg.class

3. Your JSP file that will be compiled is stored under location -
$ cd $COMMON_TOP/webapps/oacore/html
$ ls -ltr jtffmxrg.jsp

Please note that above file will be used as reference to generate class(_jtffmxrg.class) file under - $COMMON_TOP/_pages

4.To compile JSP file, perl utility - ojspCompile.pl is located under -
$FND_TOP/patch/115/bin/
ojspCompile.pl uses "-s" option to compile single jsp.

$ cd $FND_TOP/patch/115/bin/
$ perl -x $JTF_TOP/admin/scripts/ojspCompile.pl --compile -s jtffmxrg.jsp



5. Check class file last modification date as follows -
$ cd $COMMON_TOP/_pages/
$ ls -ltr _jtffmxrg.class
-rw-r--r-- 1 applprod proddba 68390 Dec 23 09:13 _jtffmxrg.class

5. Restart application opmn services-
./adopmnctl.sh stopall
./adopmnctl.sh startall

6. Clear your web browser cache

Compile all JSP files in Oracle ebs 11i


1. Take a backup of _pages directory that will be modified due to jsp compilation -

$ cd $COMMON_TOP/
$ cp -R _pages _pages23dec2019
$ ls -ld _pages*


2. Stop application opmn services -

./adapcctl.sh stop


2.Compile the jsps manually using the below command -

$ cd $JTF_TOP/admin/scripts
$ perl $JTF_TOP/admin/scripts/ojspCompile.pl --compile --flush -p 4       

3. Check class file last modification date as follows -

$ cd $COMMON_TOP/_pages
$ ls -ltr | tail

4. Start apache -

./adapcctl.sh start

5. Clear your web browser cache


Compile Single JSP in Oracle ebs 11i


1. Take a backup of .class file that will be modified due to jsp compilation -
$ cd $COMMON_TOP/_pages/_oa__html/
$ ls -ltr _jtffmxrg.class
$ cp _jtffmxrg.class _jtffmxrg.class23dec2019

2. Check for last compilation time for .class file as follows -
$ cd $COMMON_TOP/_pages/_oa__html/
$ ls -ltr _jtffmxrg.class

2. Your JSP file that will be compiled is stored under location -
$ $COMMON_TOP/html
$ ls -ltr jtffmxrg.jsp

Please note that above file will be used as reference to generate class(_jtffmxrg.class) file under - $COMMON_TOP/_pages/_oa__html/

2.To compile JSP file, perl utility - ojspCompile.pl is located under -
$JTF_TOP/admin/scripts
ojspCompile.pl uses "-s" option to compile single jsp.

$ cd $JTF_TOP/admin/scripts
$ perl -x $JTF_TOP/admin/scripts/ojspCompile.pl --compile -s jtffmxrg.jsp



3. Check class file last modification date as follows -
$ cd $COMMON_TOP/_pages/_oa__html/
$ ls -ltr _jtffmxrg.class
-rw-r--r-- 1 applprod proddba 68390 Dec 23 09:13 _jtffmxrg.class

4. Restart application apache -
adapcctl.sh stop
adapcctl.sh start

5. Clear your web browser cache

Scaling New Heights!!! My Oracle Support Community rewards and recognition




This blog is about my experience so far with below 2 world’s largest interactive community dedicated to Oracle technologies so far,
1. My Oracle Support Community
2. OTN community

You can simply register yourself using below link –

It is hard to decide which one is my favorite out of the two. I believe it is more about purpose of these two communities and differences that makes nerds like us to choose between the two or follow both.

Understanding the difference-
OTN: Available for everyone
MOSC: Only accessible with My Oracle Support access.

OTN: Possibly larger audience, but not the place to discuss MOS notes or SRs, since you can't assume that everyone accessing an OTN community also has MOS access.
Basically, both communities are managed by different teams. OTN space is open and visible to anyone. Anyone can create an OTN account.
MOSC spaces are available to only those who have a valid support contract. You need an account(MOS account) attached to valid Customer Support Identifier.

Both MOSC and OTN platforms work on Jive and are merged for users to participate in both forums.

My experience when working with both -

1. You can raise any query and there are members who will support you, guide you and you never know, you will get solution from 
community before Oracle Service Request ticket you raised.

2. You relate to experts worldwide and both communities provide you common platform for technical discussions.

3. Even if you know solution for one issue, you may be surprised to know there are other ways/possibilities for same issue that
can be more effective and efficient than solution you already have.

4. Like I read this quote - 
     'Gaining knowledge is the first step to wisdom. Sharing it is first step to humanity.'                                                                                             -- Unknown
They help you gain knowledge and share your own experiences on the same platform.

Lastly, I would like to mention that this article will only evolve with time as I wish to continue serving these 2 communities.
So, say tuned!!!