Custom Search

Friday, September 12, 2008

Setup WebUtil in Windows for Developer Suite 10g or Oracle AS 10g

WebUtil is a powerful component in Oracle Form 9i,10g, but setting up WebUtil is a nightmare for most of the developer. I hope the guideline below is useful for people who wish to setup WebUtil at Windows environment.

Steps to setup WebUtil in Developer Suite or Oracle AS

1. Download WebUtil and Jacob library
a.Webutil_106.zip from: http://www.oracle.com/technology/software/product/forms/files/webutil/webutil_106.zip

b.Extract the zip file and put into the Oracle AS or Developer Suite 10g\forms

c.Download Jacob library from: http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip

d.Extract the zip file then:
I.Put Jacob.jar in \foms\java
II.Put jacab.dll at \forms\webutil

2.Create webutil package in the database.
Open sqlplus and run create_webutil_db.sql at \forms. The script will create webutil package in the database user. You need to run create_webutil_db.sql for all database users which need to make use of Webutil.

3.Compile the webutil.pll. You can compile using Oracle Forms Developer or run the command below:

a.frmcmp module=ORACLE_HOME\forms\webutil.pll userid= module_type=library compile_all=yes

4.Setup default.env file
at \forms\server
a.The Java runtime Jar rt.jar (including its physical location) file must be included in the CLASSPATH, along with the Java runtime Jar rt.jar

b.At CLASSPATH add: \jdk\jre\lib\rt.jar

5.Signing frmwebutil.jar and Jacob.jar.

a.Before signing for jar file, you need to make sure your PATH environment variable is point to a jarsigner. To do this, follow the step below:
I.Right click on “My computer”, then choose “Properties”
II.Choose “Advanced” tab, and click on “Environment Variables” button
III.Find “PATH” variable and the follow line: \jdk\bin

b.Go to command prompt and locate yourself into \forms\webutil (Please close the previous command prompt windows and open a new one, because once you change the value at environment variable, it will not be reflected at DOS until you open a new command windows)

c.In command prompt use the sign_webutil.bat to sign the jar files. Specifiy the command as below:
I.sign_webutil \forms\java\frmwebutil.jar
II.sign_webutil \forms\java\jacob.jar

6.To enable upload and downloading file using WebUtil, please make sure the setting in \forms\server\webutil.cgf is following as below:

transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=
transfer.appsrv.accessControl=FALSE

7.Setup frmweb.cfg file. For any application which need to use WebUtil just past all the setting in [webutil] section into the application section. For instance, I have a application called “TEST” make use of the function in WebUtil and I already create a section in frmweb.cfg as below:

[TEST]
FORM=D:\FORMS\MENU70_10G.FMX
USERID=TEST/123@ORCL

Copy the setting from [webutil] section and paste at [TEST] as below:

[TEST]
FORM=D:\FORMS\MENU70_10G.FMX
USERID=TEST/123@ORCL
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm
archive_jini=frmall_jinit.jar
archive=frmall.jar
lookAndFeel=oracle

8.Grant WebUtil session at client side.
Upon client first login to the application. JInitiator will ask client to grant permission for signed applet. Client must choose “Grant this session” or “Grant Always”. Without this step WebUtil will not work.

No comments: