How To Install Webutil on
10.1.2.x Oracle Application Server
WebUtill provides way of transferring files between the Client PC and the Application/Database Server via Oracle Web Forms.
The core features of WebUtil are :-
Text_IO
o Read and write text files on the client machine
Tool_Env
o Read client side variables
C API on the client
o Interface with client side C.
Host
o Run Host commands on the client machine
OLE2
o Integrate with client side OLE (e.g. Word and Excel)
Enhanced Host commands
o Host command can now call back into Forms!
Browser functions
o Integrate with the browser.
File transfer
o Move from between the client, application server and database.
File Manipulation
o Manipulate client side files.
Client machine information
o Read information from the client machine
READ/WRITE_IMAGE_FILE
o Read and write client side images
Get_File_Name
o Use a file selection dialog on the client machine
D2KWUtil features
o Client side interface into the D2KWUtil package.
The WebUtil version
should match the version of Forms. For example, 10.1.2.2 should use WebUtil
10.1.2.2 which comes from the 10.1.2.2 patch. However, Oracle recommends you be
on 10.1.2.3.
By Default Webutil is
NOT delivered as a component of Oracle Application Server (Webutil is delivered
as a component of Oracle Developer Suite only), hence you need to get the correct
version of the frmwebutil.jar from an Oracle Developer Suite installation
that matches the same Application Server version.
NOTE: The
fundamental steps for setting up webutil on UNIX on the Application Server are
not different from any other platform. The recommended webutil setup
documentation is contained in the download at ->
http://www.oracle.com/technetwork/indexes/downloads/index.html#tools (See the "Forms WebUtil" link under the Utilities and Plugins Section)
http://www.oracle.com/technetwork/indexes/downloads/index.html#tools (See the "Forms WebUtil" link under the Utilities and Plugins Section)
Starting from Oracle
Forms 10.1.2.0.2, Webutil is delivered as a component of Oracle Developer Suite
10g (10.1.2.0.2). The file frmwebutil.jar is located under
ORACLE_HOME/forms/java.
If you are using an earlier
version of 10gR2 such as 10.1.2.0.2 or 10.1.2.2 you will use:
0. Linux and Oracle AS version 10.1.2.0.2 - 10.1.2.3
1. Create directory webutil in ORACLE_HOME/forms
2. Transfer in binary mode the following files in the directory $ORACLE_HOME/forms/webutil
d2kwut60.dll
jacob.dll
JNIsharedstubs.dll
3. The following alias was created in the file ORACLE_HOME/forms/server/forms.conf in Oracle Application Server:
AliasMatch ^/forms/webutil/(..*) "$ORACLE_HOME/forms/webutil/$1"
4. Copy from webutil_106\java to ORACLE_HOME/forms/java the following two javascript files:
1. Create directory webutil in ORACLE_HOME/forms
2. Transfer in binary mode the following files in the directory $ORACLE_HOME/forms/webutil
d2kwut60.dll
jacob.dll
JNIsharedstubs.dll
3. The following alias was created in the file ORACLE_HOME/forms/server/forms.conf in Oracle Application Server:
AliasMatch ^/forms/webutil/(..*) "$ORACLE_HOME/forms/webutil/$1"
4. Copy from webutil_106\java to ORACLE_HOME/forms/java the following two javascript files:
forms_base_ie.js
forms_ie.js
5. Copy/sign jar files in the following directory ORACLE_HOME/forms/java:
frmwebutil.jar/jacob.jar
You need to sign both frmwebutil.jar and jacob.jar with the same digital certificate.
This is a one-time operation which allows your end-users to trust that the JACOB routines can access client side
resources.
This script is called sign_webutil.sh for UNIX and sign_webutil.bat for Windows.
forms_ie.js
5. Copy/sign jar files in the following directory ORACLE_HOME/forms/java:
frmwebutil.jar/jacob.jar
You need to sign both frmwebutil.jar and jacob.jar with the same digital certificate.
This is a one-time operation which allows your end-users to trust that the JACOB routines can access client side
resources.
This script is called sign_webutil.sh for UNIX and sign_webutil.bat for Windows.
Copy the Webutil JAR
file frmwebutil.jar from %ORACLE_HOME%\forms\java of
developer suite to %ORACLE_HOME%\forms\java
of the application server.
Note: For 10.1.2.0.2, frmwebutil.jar needed be signed.
From 10.1.2.2 and later, it is already signed.
# $ORACLE_HOME/forms/webutil/sign_webutil.sh
$ORACLE_HOME/forms/java/Jacob.jar
#
$ORACLE_HOME/forms/webutil/sign_webutil.sh $ORACLE_HOME/forms/java/frmwebutil.jar
for windows:
Sign Webutil JAR files by running these following commands Make sure Form Builder is Closed
C:\DevSuiteHome_1\forms\webutil>sign_webutil.bat c:\DevSuiteHome_1\forms\java\frmwebutil.jar
C:\DevSuiteHome_1\forms\webutil>sign_webutil.bat c:\DevSuiteHome_1\forms\java\jacob.jar
6. The file webutil.cfg was created in the
ORACLE_HOME/forms/server and he is looking like:
logging.file=
logging.enabled=FALSE
logging.errorsonly=FALSE
logging.connections=FALSE
install.syslib.location=/webutil
install.syslib.0.7.1=jacob.dll|94208|1.0|true
install.syslib.0.9.1=JNIsharedstubs.dll|65582|1.0|true
install.syslib.0.9.2=d2kwut60.dll|192512|1.0|true
logging.file=
logging.enabled=FALSE
logging.errorsonly=FALSE
logging.connections=FALSE
install.syslib.location=/webutil
install.syslib.0.7.1=jacob.dll|94208|1.0|true
install.syslib.0.9.1=JNIsharedstubs.dll|65582|1.0|true
install.syslib.0.9.2=d2kwut60.dll|192512|1.0|true
In the webutil.cfg file ensure you have the lines
transfer.appsrv.workAreaRoot=d:\temp
transfer.appsrv.accessControl=FALSE
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.accessControl=FALSE
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
We are only really interested in getting the File Transfer working to start with, and this requires the above change to webutil.cfg (stored under forms/server)
The following variable must be defined in %ORACLE_HOME%\forms\server\default.env:
WEBUTIL_CONFIG=\forms\server\webutil.cfg
7. The following jars must be included in the CLASSPATH in
forms/server/default.env:
%ORACLE_HOME%\forms\java\frmall.jar;%ORACLE_HOME%\forms\java\frmwebutil.jar;%ORACLE_HOME%\forms\java\jacob.jar;%ORACLE_HOME%\jdk\jre\lib\rt.jar
7.1. Add frmwebutil.jar and Jacob.jar path entries into Windows Registry (Start > Run > type regedit and press enter) goto HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE > DEVSUITE_HOME > FORMS_BUILDER_CLASSPATH Variable.
Note: if you are using Linux then instead of this setup the environment variable.
8. In formsweb.cfg create the following config section
[webutil]
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm
baseHTML=webutilbase.htm
archive_jini=frmall_jinit.jar
archive=frmall.jar
lookAndFeel=generic
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm
baseHTML=webutilbase.htm
archive_jini=frmall_jinit.jar
archive=frmall.jar
lookAndFeel=generic
9. Create a
database user "Webutil".
Now open the SQL Session
connecting with SYS user, and create a user named WEBUTIL and Password is
ORACLE.
SQL> CREATE USER WEBUTIL IDENTIFIED BY ORACLE
2 DEFAULT TABLESPACE USERS
3 TEMPORARY TABLESPACE TEMP;
User created.
SQL> GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO WEBUTIL;
Grant succeeded.
SQL> CONN WEBUTIL/ORACLE
Connected.
USER is "WEBUTIL"
linesize 100
pagesize 100
long 80
SQL> @D:\Webutil_Final\create_webutil_db.sql
Package created.
Package body created.
SQL> CREATE PUBLIC SYNONYM WEBUTIL_DB FOR WEBUTIL.WEBUTIL_DB;
Synonym created.
SQL> CONN SYS/ORACLE AS SYSDBA
Connected.
SQL> GRANT EXECUTE ON WEBUTIL_DB TO PUBLIC;
SQL> CREATE USER WEBUTIL IDENTIFIED BY ORACLE
2 DEFAULT TABLESPACE USERS
3 TEMPORARY TABLESPACE TEMP;
User created.
SQL> GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO WEBUTIL;
Grant succeeded.
SQL> CONN WEBUTIL/ORACLE
Connected.
USER is "WEBUTIL"
linesize 100
pagesize 100
long 80
SQL> @D:\Webutil_Final\create_webutil_db.sql
Package created.
Package body created.
SQL> CREATE PUBLIC SYNONYM WEBUTIL_DB FOR WEBUTIL.WEBUTIL_DB;
Synonym created.
SQL> CONN SYS/ORACLE AS SYSDBA
Connected.
SQL> GRANT EXECUTE ON WEBUTIL_DB TO PUBLIC;
10. Transfer in binary mode the following files :
webutil.olb
webutil.pll
WU_TEST_106.fmb
in the ORACLE_HOME/forms directory
11. Transfer the following files :
webutilbase.htm
webutiljini.htm
webutiljpi.htm
in the directory ORACLE_HOME/forms/server
12. Compile the webutil.pll library:
frmcmp.sh MODULE=$ORACLE_HOME/forms/webutil.pll USERID=webutil/webutil@orcl MODULE_TYPE=LIBRARY
OUTPUT_FILE=$ORACLE_HOME/forms/webutil.plx
- no compilation errors
12.1. Give rights on all files/folders:
# chown -R 700 $ORACLE_HOME/
13. Bounce the OC4J_BI_Forms container on the application server middle tier
14. Compile WU_TEST_106.fmb file
frmcmp.sh MODULE=$ORACLE_HOME/forms/WU_TEST_106.fmb USERID=webutil/webutil@orcl MODULE_TYPE=FORM
OUTPUT_FILE=$ORACLE_HOME/forms/WU_TEST_106.fmx
- no compilation errors
Extra Note:
Copy the breadcrumb.jar (any jar file) in your /forms/java/ folder . Add it to the archive and archive_jini tags of the /forms/server/formsweb.cfg file
e.g.: archive_jini=frmall_jinit.jar,breadcrumb.jar
archive=frmall.jar,breadcrumb.jar . Open the breadcrumb.fmb module (Oracle Forms 10.1.2.0.2)
. Compile all and run the module