Monday, December 22, 2008

Steps to configure Webutil

What is WebUtil???

"WebUtil is a pre-packaged set of components that can be used to add a great deal of extra functionality to Web-deployed Forms applications. WebUtil addresses common challenges faced by Oracle Forms developers who wish to build applications which integrate tightly with the client browser - the computer at which the end user is actually located."

Configuration :
1- Downlaod the file from oracle site or from the attachments as I've attached the version 1.0.6 also Jacob files.
2- Extract the webutil_106.zip file in the ( ORACLE_HOME\forms90 or [forms in 10g] )You've to get direcotries like this inside forms folder:
■ doc
■ java
■ server
■ webutil
■ Webutil.pll, Webutil.olb and the create_webutil_db.sql exist in the Forms directory

--> Also extract jacov.dll into webutil directory and jacob.jar into java directory from Jacob_18.zip

3- Create user named webutil in your database and give appropiate privilge.

4- conenct with the user and run the file create_webutil_db.sql5- Create public synonym for webutil_db
Please see this example :

C:\>sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 17 14:51:55 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> conn / as sysdbaConnected.

SQL> create user webutil identified by webutil default tablespace users;
User created.

SQL> grant connect,resource to webutil;
Grant succeeded.

SQL> conn webutil/webutil
Connected.

SQL> @C:\Dev10g\forms\create_webutil_db.sql
Package created.
Package body created.

SQL> conn / as sysdba
Connected.

SQL> create public synonym webutil_db for webutil.webutil_db;
Synonym created.

SQL> grant execute on webutil_db to public;
Grant succeeded.

SQL> revoke connect,resource from webutil;
Revoke succeeded.

6- Configuring the files :
a- Create virtual directory :
Add the following code in : forms/server/forms.conf
# Virtual path for webutil
AliasMatch ^/forms/webutil/(..*) "C:\Dev10g/forms/webutil/$1"

Check if the above line is not there, then add it else leave.

b- in forms/server/default.env file add this line :

# webutil config file path
WEBUTIL_CONFIG=C:\Dev10g\forms\server\webutil.cfg

Also append the following to CLASSPATH variable which reside in the same file
;C:\Dev10g\forms\java\frmwebutil.jar

it will look like this :
CLASSPATH=C:\Dev10g\j2ee\OC4J_BI_Forms\applications\formsapp\formsweb\WEB-INF\lib\frmsrv.jar;C:\Dev10g\jlib\repository.jar;C:\Dev10g\jlib\ldapjclnt10.jar;C:\Dev10g\jlib\debugger.jar; C:\Dev10g\jlib\ewt3.jar;C:\Dev10g\jlib\share.jar;C:\Dev10g\jlib\utj.jar;C:\Dev10g\jlib\zrclient.jar; C:\Dev10g\reports\jlib\rwrun.jar;C:\Dev10g\forms\java\frmwebutil.jar

c- Configuring formsweb.cfg :
Please insure that these files are in server directory : webutilbase.htm,webutiljini.htm,webutiljpi.htm,webutil.cfg

Open formsweb.cfg
:-- Add these lines to your application configuration which will use Webutil :
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm

or add this config to your file if you want to run seperate FMX against it :
[webutil]
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

7-Please add the below to archive_jini=frmall_jinit.jar in formsweb.cfg file like
archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar

8- Siging the JAR files :
a- Open a Command window and change to the ORACLE_HOME\forms\webutil directory.
b- Check that ORACLE_HOME/jdk/bin is in the path. If it is not, add it by runing this :
C:\Dev10g\forms\webutil>set path=c:\Dev10g\jdk\bin;%path%

c- call the sign batch file :
C:\Dev10g\forms\webutil>sign_webutil.bat c:\dev10g\forms\java\frmwebutil.jar
=> Also sign the jacob file
C:\Dev10g\forms\webutil>sign_webutil.bat c:\dev10g\forms\java\jacob.jar

you can test your configuration by calling like this :
http://yourserver/forms/frmservlet?config=webutil&form=testwebutil.fmx

To download jacob_18.zip click on the below link.
http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip

To download webutil_106.zip click on the below link.
http://www.oracle.com/technology/software/products/forms/files/webutil/webutil_106.zip

To download webutil_demo.zip click on the below link.
http://www.oracle.com/technology/products/forms/htdocs/webutil/Webutil_demo.zip

To see webutil demo click on below link.
http://www.oracle.com/technology/sample_code/products/forms/demo/9i/javabeans_pjc_samples/webutil/viewlet/WebUtil_Simple_viewlet_swf.html

Please post comment if you need any help.

No comments: