The Power of WebUtil - Oracle
The Power of WebUtil
Gerd Volberg, Opitz Consulting GmbH
Introduction
This White Paper describes the installation, a demo application and my opinion about the future of Oracle’s new Toolset WebUtil.
Installation
In this section only the installation which finds use on my notebook is explained. Further information, as for example the complete installation for iAS, can be found in the document “WebUtil Familiarization Manual” from Duncan Mills.
Pre-Requisites
Your environment has to be at minimum :
1. Windows-NT, Windows 2000, Windows XP
2. Oracle9iDS Rel.2 v9.0.2
3.
4. JInitiator 1.3.1.8 +
5.
6. Java2 SDK 1.3.1. +
7. WebUtil 1.02
8.
If you want to use the JavaComBridge from Dan Adler (for OLE-stuff, etc…) [optional]
9. Jacob 1.7 ()
10. Binary:
11. Sources (optional):
Install WebUtil
Install WebUtil in the \forms90 directory, e.g. for my installation:
= C:\oracle\oraForms9
= C:\oracle\oraForms9\forms90\WEBUTIL
= C:\oracle\oraForms9\forms90\WEBUTIL\forms
= C:\oracle\oraForms9\forms90\WEBUTIL\lib
= C:\oracle\oraForms9\forms90\WEBUTIL\util
Copy Jacob.dll and Jacob.jar to [optional]
Changes to the Config Files
All modifications are printed in boldface
Signer.Properties in
#Properties file for signer.bat & makecert.bat
#Defines the overall settings for Signing PJC jars
#Lines prefixed with # are ignored
#Directory Settings - ** change these to suit your system **
#do not include trailing "\"
#JDK_HOME=D:\tools\jdk1.3.1
#JINIT_HOME=d:\Program Files\Oracle\JInitiator 1.3.1.9
JDK_HOME=C:\oracle\oraForms9\jdk
JINIT_HOME=C:\Programme\Oracle\JInitiator 1.3.1.8
#Certificate settings:
# These are used to generate the initial signing certificate
# Change them to suite your organisation
#DN_O=Oracle
#DN_C=US
DN_CN=Product Management
DN_OU=Development Tools
DN_O=OpitzConsulting
DN_C=DE
JAR_KEY=webutil
JAR_KEY_PASSWORD=webutil
Certificate and Sign the JAR-Files
Start a command-shell on the client.
Change directory to
C:
cd \oracle\oraForms9\forms90\WEBUTIL\util
Create certificate
makecert
Sign your JAR files in
sign C:\oracle\oraForms9\forms90\WEBUTIL\lib\webutil.jar
sign C:\oracle\oraForms9\forms90\WEBUTIL\lib\jacob.jar
Registry Changes
Append the following line to your FORMS90_BUILDER_CLASSPATH
C:\oracle\oraForms9\forms90\WEBUTIL\lib\webutil.jar
Orion-web.xml in \j2ee\Oracle9iDS\application-deployments\forms\forms90web
C:\oracle\oraForms9/forms90/server/formsweb.cfg
forms90.conf in \forms90\server
In the section with AliasMatches add one :
# Webutil Erweiterung
AliasMatch ^/forms90/webutil/(..*) "C:\oracle\oraForms9\forms90\WEBUTIL\lib/$1"
formsweb.cfg in \forms90\server
At top of the parameter file add
webUtilArchive=/forms90/webutil/webutil.jar,/forms90/webutil/jacob.jar
Change parameters to
baseHTMLjinitiator=C:\oracle\oraForms9\forms90\WEBUTIL\server\webutiljini.htm
baseHTMLjpi=C:\oracle\oraForms9\forms90\WEBUTIL\server\webutiljpi.htm
baseHTML=C:\oracle\oraForms9\forms90\WEBUTIL\server\webutilbase.htm
default.env in \forms90\server
After the ORACLE_HOME section add a webutil section
ORACLE_HOME=C:\oracle\oraForms9
#Webutil-Section
WEBUTIL_CONFIG=C:\oracle\oraForms9\forms90\WEBUTIL\server\webutil.cfg
At the end extend the classpath and the formspath as shown here
CLASSPATH=C:\oracle\oraForms9\jlib\debugger.jar;C:\oracle\oraForms9\jlib\ewt3.jar:C:\oracle\oraForms9\jlib\share.jar;C:\oracle\oraForms9\jlib\utj90.jar;C:\oracle\oraForms9\forms90\WEBUTIL\lib\webutil.jar;C:\oracle\oraForms9\jdk\jre\lib\rt.jar;C:\oracle\oraForms9\forms90\WEBUTIL\lib\jacob.jar;C:\oracle\oraForms9\jdk\jre\bin\classic\jvm.dll
FORMS90_PATH=C:\oracle\oraForms9\CGENF61\admin;C:\oracle\oraForms9\forms90\WEBUTIL\forms;C:\oracle\oraForms9\forms90
Changes in Forms
For all forms which have to be webutil-enabled:
12. attach WebUtil.pll to the Libraries
13. subclass WebUtil Objectgroup from the webutil.olb to the form
Modify all your code as you can see in the next section
Run your form and have fun with the new functionality
Demo Application
The following application is a little example for the easy use of the new WebUtil functionalities
WebUtil-Application
[pic]
Screenshot of my WebUtil-Application
Button “TEXT_IO”
declare
v_file text_io.file_type;
v_string varchar2(2000);
begin
v_file := text_io.fopen ('C:\oracle\oraForms9\forms90\WEBUTIL\forms\cs.txt', 'r');
text_io.get_line (v_file, v_String);
message (v_String);
text_io.fclose (v_file);
end;
Button “OLE2”
OLE_Aufruf_CS;
PROCEDURE OLE_Aufruf_CS IS
v_ole_excel ole2.obj_type;
v_OLE_workbook ole2.obj_type;
v_OLE_worksheet ole2.obj_type;
v_OLE_Worksheets ole2.obj_type;
v_file_name varchar2 (2000) := 'C:\oracle\oraForms9\forms90\WEBUTIL\forms\spu.xls';
OBJ_HND OLE2.OBJ_TYPE;
v_OLE_Range OLE2.OBJ_TYPE;
arglist ole2.list_type;
v_OLE_Workbooks OLE2.OBJ_TYPE;
BEGIN
v_ole_excel := ole2.Create_obj ('Excel.Application');
OLE2.SET_PROPERTY ( v_ole_excel , 'visible', 1);
v_OLE_Workbooks := OLE2.GET_OBJ_PROPERTY (v_ole_excel, 'Workbooks');
arglist := ole2.create_arglist;
ole2.add_arg (arglist, v_file_name );
v_OLE_workbook := ole2.invoke_obj (v_OLE_workbooks, 'open', arglist);
ole2.destroy_arglist (arglist);
v_OLE_Worksheets := OLE2.GET_OBJ_PROPERTY (v_OLE_workbook, 'Worksheets');
arglist := ole2.create_arglist;
ole2.add_arg (arglist, 1);
v_OLE_Worksheet := OLE2.GET_OBJ_PROPERTY (v_OLE_Worksheets, 'Item', arglist);
ole2.destroy_arglist (arglist);
arglist := ole2.create_arglist;
ole2.add_arg (arglist, 'B1');
v_OLE_Range := OLE2.GET_OBJ_PROPERTY (v_OLE_Worksheet, 'Range', arglist );
ole2.destroy_arglist (arglist);
OLE2.SET_PROPERTY (v_OLE_Range, 'FormulaR1C1', 'This is the Test with the OLE2-package');
END;
Button “CLIENT_TEXT_IO”
declare
v_file client_text_io.file_type;
v_string varchar2(2000);
begin
v_file := client_text_io.fopen ('C:\oracle\oraForms9\forms90\WEBUTIL\forms\web.txt', 'r');
client_text_io.get_line (v_file, v_String);
message (v_String);
client_text_io.fclose (v_file);
end;
Button “FILE_EXISTS”
begin
if webutil_file.file_exists ('C:\oracle\oraForms9\forms90\WEBUTIL\forms\cs.txt') then
message ('file exists');
else
message ('file don''t exists');
end if;
end;
Button “CLIENT_OLE2”
OLE_AUFRUF_Web;
PROCEDURE OLE_AUFRUF_Web IS
v_ole_excel client_ole2.obj_type;
v_OLE_workbook client_ole2.obj_type;
v_OLE_worksheet client_ole2.obj_type;
v_OLE_Worksheets client_ole2.obj_type;
v_file_name varchar2 (2000) := 'C:\oracle\oraForms9\forms90\WEBUTIL\forms\spu.xls';
OBJ_HND client_OLE2.OBJ_TYPE;
v_OLE_Range client_OLE2.OBJ_TYPE;
arglist client_ole2.list_type;
v_OLE_Workbooks client_OLE2.OBJ_TYPE;
BEGIN
v_ole_excel := client_ole2.create_obj ('Excel.Application');
client_OLE2.SET_PROPERTY ( v_ole_excel , 'visible', 1);
v_OLE_Workbooks := client_OLE2.GET_OBJ_PROPERTY(v_ole_excel ,'Workbooks');
arglist := client_ole2.create_arglist;
client_ole2.add_arg (arglist, v_file_name );
v_OLE_workbook := client_ole2.invoke_obj (v_OLE_workbooks, 'open', arglist);
client_ole2.destroy_arglist (arglist);
v_OLE_Worksheets := client_ole2.GET_OBJ_PROPERTY(v_OLE_workbook ,'Worksheets');
arglist := client_ole2.create_arglist;
client_ole2.add_arg (arglist, 1);
v_OLE_Worksheet := client_ole2.GET_OBJ_PROPERTY(v_OLE_Worksheets, 'Item', arglist);
client_ole2.destroy_arglist (arglist);
arglist := client_ole2.create_arglist;
client_ole2.add_arg (arglist, 'B1');
v_OLE_Range := client_ole2.GET_OBJ_PROPERTY(v_OLE_Worksheet, 'Range', arglist );
client_ole2.destroy_arglist (arglist);
client_ole2.SET_PROPERTY (v_OLE_Range, 'FormulaR1C1', 'This is the Test with the new client_OLE2-package');
END;
The future
The installation of WebUtil is a little bit complex. I hope, there will be a more automated way to integrate and install the toolset.
WebUtil is the best toolset for web-developers in the forms-world. All the java-code written by oneself is now obsolete and can be substituted by WebUtil.
My opinion is: Use WebUtil and don’t write your own java beans. It’s productiv, efficient and the best way to get webenabled with Forms9i.
Just use it !
Gerd Volberg
Opitz Consulting
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- the power of asking why
- the power of compounding
- the power of compounding worksheet
- the power of questions pdf
- the power of interest
- the power of compound interest
- the power of believing
- the power of compounding interest
- 10 to the power of negative 6
- quotes about the power of music
- to the power of calculator
- 2 to the power of 5