Webutil Documentation
Webutil Documentation
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 is primarily focused at solving the more common challenges faced by Forms developers who wish to build applications which integrate tightly with the Client Browser machine - the machine that the end user is actually sitting at. WebUtil Core Features Text_IO - Read and write text files on the client machine. File transfer - Move from between the client, application server and database. Tool_Env - Read client side variables File Manipulation - Manipulate client side files. C API on the client - Interface with client side C. Client machine information - Read information from the client machine Host - Run Host commands on the client machine READ/WRITE_IMAGE_FILE - Read and write client side images OLE2 - Integrate with client side OLE (e.g. Word and Excel) Get_File_Name - Use a file selection dialog on the client machine Enhanced Host commands - Host command can now call back into Forms! D2KWUtil features - Client side interface into the D2KWUtil package. Browser functions - Integrate with the browser. Downloading Webutil Webutil_106.zip can be downloaded from the Oracle website or the below lo. To download webutil_106.zip click on the below mentioned link. http://www.oracle.com/technology/software/products/forms/files/webutil/webutil_106.zip You can find a copy of the files in folder webutil_106. You will also need a copy of the Jacob files to run webutil on the client machine. Jacob_18.zip can be downloaded from the below mentioned link. http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip You will find a copy of these files in folder jacob_18. Installing Webutil (Please check the correct path in your machine for the blue font) 1) Create folder webutil under C:\orant10g\forms90 2) Copy file frmwebutil.jar from folder: webutil_106\webutil_106\java to: C:\orant10g\forms90\java file: jacob.jar from folder: jacob_18 to: C:\orant10g\forms90\java file: d2kwut60.dll, JNIsharedstubs.dll from folder: webutil_106\webutil_106\webutil to: C:\orant10g\forms90\webutil file: jacob.dll from folder: jacob_18 to: C:\orant10g\forms90\webutil
file: forms_base_ie.js, forms_ie.js from folder: webutil_106\webutil_106\java to: C:\orant10g\forms90\java file: webutil.olb, webutil.pll and create_webutil_db.sql from folder: webutil_106\webutil_106 to: C:\orant10g\forms90\forms file: webutilbase.htm, webutiljini.htm, webutiljpi.htm and webutil.cfg from folder: webutil_106\webutil_106\server to: C:\orant10g\forms90\server file: sign_webutil.bat from folder: webutil_106\webutil_106\webutil To: C:\orant10g\forms90\webutil 3) In C:\orant10g\forms90\server\formsweb.cfg file add the following entries [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=frmwebutil.jar,jacob.jar,f90all_jinit.jar archive=frmwebutil.jar,jacob.jar lookAndFeel=Generic width=100% height=100% jpi_download_page=https://java.sun.com/products/archive/j2se/1.4.2_09/index.html jpi_classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93 jpi_codebase=https://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586. cab#Version=1,4,0,0 jpi_mimetype=application/x-java-applet;version=1.4 4) In C:\orant10g\forms90\server\default.env file FORMS90_PATH C:\orant10g\forms90\webutil;C:\orant10g\forms90\server add the following entries to
Add the webutil config file path WEBUTIL_CONFIG=C:\orant10g\forms90\server\webutil.cfg Add frmwebutil.jar, jacob.jar into Classpath CLASSPATH= C:\orant10g\forms90\java\frmall.jar;C:\orant10g\forms90/java\frmwebutil.jar;C:\orant10g\forms 90/java\jacob.jar;C:\orant10g\jdk\jre\lib\rt.jar;c:\orant10g\forms90\webutil\lib\webutil.jar
5) Add the above 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. 6) Sign Webutil JAR files by running these following commands Make sure Form Builder is Closed - Start the command prompt - cd orant10g\forms90\java - set PATH=orant10g\jdk\bin;%PATH% - C:\orant10g\forms90\webutil\sign_webutil.bat C:\orant10g\forms90\java\frmwebutil.jar - Start the command prompt - cd orant10g\forms90\java - set PATH=orant10g\jdk\bin;%PATH% - C:\orant10g\forms90\webutil\sign_webutil.bat C:\orant10g\forms90\java\jacob.jar If its not successful, follow the below commands C:\orant10g\jdk\bin>keytool -genkey -dname "CN=Product Management, OU=Development Tools, O=Oracle, C=US" -alias webutil2 -keypass webutil2 -keystore C:/temp/3keystore -storepass webutilpasswd -validity 360 C:\orant10g\jdk\bin>jarsigner -keystore c:/temp/3keystore -storepass webutilpasswd -keypass webutil2 C:/orant10g/forms90/java/frmwebutil.jar webutil2 C:\orant10g\jdk\bin>jarsigner -keystore c:/temp/3keystore -storepass webutilpasswd -keypass webutil2 C:/orant10g/forms90/java/jacob.jar webutil2 To Verify JAR FILE IS Installed then write below coding C:\orant10g\jdk\bin>jarsigner -verify C:/orant10g/forms90/java/jacob.jar C:\orant10g\jdk\bin>jarsigner -verify C:/orant10g/forms90/java/frmwebutil.jar 7) The following virtual path must be defined in the C:\orant10g\forms90\server\forms.conf file: AliasMatch ^/forms90/webutil/(..*) "c:/orant10g/forms90/webutil/$1" 8) Open webutil.cfg file and add the following line Add the following line : (This will give an error if the dll file is missing so add it only if you have the dll file) install.syslib.0.user.1=ffisamp.dll|40960|1.0|true below : 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 9) In the webutil.cfg file ensure you have the lines transfer.appsrv.workAreaRoot=C:\temp transfer.appsrv.accessControl=FALSE
transfer.database.enabled=TRUE transfer.appsrv.enabled=TRUE Configuring the Database: Create a schema to hold the WebUtil stored code, and privileges needed to connect and create a stored package. Schema name "WEBUTIL" is recommended for no reason other than consistency over the user base. Open c:\orant10g\forms90\create_webutil_db.sql in a text editor, and delete or comment out the EXIT statement, to be able to see whether the objects were created without errors. Start SQL*Plus as SYSTEM, and issue: CREATE USER webutil IDENTIFIED BY [password] DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp; / GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil; / CONNECT webutil/[password]@[connectstring] @ C:/orant10g/forms90/create_webutil_db.sql -- Inspect SQL*Plus output for errors, and then CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db; / Reconnect as SYSTEM, and issue: grant execute on webutil_db to public; Setting up Form Builder: 1) Start the OC4J instance 2) Start Forms Builder and connect to a schema in the RDBMS. 3) Open Form builder Connect with SCOTT and in PL/SQL libraries open Webutil.pll file. File > Save as and Rename the file to different name e.g WebUtil_lib. Compile the new PLL file and generate it. Press Ctrl+Shift+K to compile all and generate a plx file. 4) Attach the new named Webutil_lib.pll to your form with Remove Path option YES. Do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T). It is important to generate the PLX, to avoid the FRM-40039 discussed in Note 303682.1 If the PLX is not generated, the Webutil.pll library would have to be attached with full path information to all forms wishing to use WebUtil. This is NOT recommended. 5) Create a new FMB. Open webutil.olb, and Subclass (not Copy) the Webutil object to the form. There is no need to Subclass the WebutilConfig object. Attach the Webutil.pll Library, and remove the path. Add an ON-LOGON trigger with the code NULL; to avoid having to connect to an RDBMS (optional). Create a new button on a new canvas, with the code show_webutil_information (TRUE); in a WHEN-BUTTON-PRESSED trigger. Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K). 6) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if the "Application Server URL" is empty. Then append "?config=webutil" at the end, so you end up with a URL of the form http://server:port/forms/frmservlet?config=webutil 7) Now compile your form and run it. Note: Browser will ask to certify these libraries first time Choose ALWAYS certify. Check Java Console icon on the task bar and see frmwebtul.jar and jacob.jar are loaded successfully.
To see the webutil demo click on below link. http://www.oracle.com/technology/sample_code/products/forms/demo/9i/javabeans_pjc_samples/we butil/viewlet/WebUtil_Simple_viewlet_swf.html Or open the file webutil_demo.avi Some Webutil errors 1) Error Forms session <1> aborted: unable to communicate with runtime process. in oracle developer suite 9.0.2 Or frm 923101 Remove webutil.pll from the attached libraries and re-attach it 2) WUC-24 error message Copy the virtual-directory line and add the real-path and paste that line into the onion-web.xml on C:\orant10g\j2ee\DevSuite\application-deployments\forms\form90web directory. The added line looks like the following: <virtual-directory virtual-path="/webutil" real-path="C:\orant10g\forms90\WebUtil" /> 3) WUC-18 error Add the below line in webutil.cfg install.syslib.location=http://[host]:port]/forms90/webutil eg. install.syslib.location=http:// adpc167.cc.rhul.local:8889/forms90/webutil