Professional Documents
Culture Documents
plz copy webutil object library and pll in forms folder of oracle developer home directory.
Webutil Steps
=========================
1. On drive C create a folder name Webutil.
Extract the jacob_18.zip file into C:\Webutil_Final Folder.
Output
Generating a self signing certificate for key=webutil2...
...successfully done.
.
Backing up D:\oracle\DevSuiteHome_1\forms\java\frmwebutil.jar as D:\oracle\DevSu
iteHome_1\forms\java\frmwebutil.jar.old...
1 file(s) copied.
Signing D:\oracle\DevSuiteHome_1\forms\java\frmwebutil.jar using key=webutil2...
...successfully done.
C:\>D:\oracle\DevSuiteHome_1\forms\webutil\sign_webutil
D:\oracle\DevSuiteHome_1\forms\java\jacob.jar
Output
Generating a self signing certificate for key=webutil2...
keytool error: java.lang.Exception: Key pair not generated, alias already exists
.
There were warnings or errors while generating a self signing certificate. Please review them.
.
Backing up D:\oracle\DevSuiteHome_1\forms\java\jacob.jar as
D:\oracle\DevSuiteHome_1\forms\java\jacob.jar.old...
1 file(s) copied.
Signing D:\oracle\DevSuiteHome_1\forms\java\jacob.jar using key=webutil2...
...successfully done.
--On Application Server
--Generate Keystore :
D:\>%ORACLE_HOME%\jdk\bin\keytool -genkey -alias myapp -keyalg RSA -keystore
.keystore_myapp
E:\oracleas10g\FRHOME1\jdk\bin\keytool -genkey -alias myapp2 -keyalg RSA -keystore
.keystore_myapp2
4. 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 DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP;
User created.
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.
Synonym created.
SQL> CONN SYS/ORACLE AS SYSDBA
Connected.
Grant succeeded.
Table created.
SQL> COMMIT;
Commit complete.
9. Start OC4J instance,Open the Form Builder, and connect with WEBUTIL/ORACLE@orcl,
Open the WEBUTIL.PLL file, located at
D:\oracle\DevSuiteHome_1\forms folder, compile all (Shift+Control+K), and genearte to PLX.
Then Open the WEBUTIL.OLB, and
Subclass object to the form. Now attache the webutil.pll library and remove the path.
10.Create a new form module as Master&Detail using EMP and EMP_IMAGE data block.
After completing the wizard switch to Object naviagtor->Object Library->Open Webutil.olb
which are located on
D:\oracle\DevSuiteHome_1\forms folder. Subclass the following, which are located in object
library
WEBUTILCONFIG into Parameter Node.
WEBUTIL into Object Group Node.
12. Now create One Text item, and Two Push buttons on WEBUTIL data block, and choose the
Canvas where EMP Block are shown.
At form level
==================
WHEN NEW FORM INSTANCE
declare
fake_timer TIMER;
begin
-- Purpose of the fake timer is the we cannot call webutil in this trigger since the
-- beans have not yet been instantiated. If we put the code in a when-timer-expired-trigger
-- it means that this timer will not start running until Forms has focus (and so the webutil
-- beans will be instantiated and so call canbe made.
fake_timer:= CREATE_TIMER('webutil',100,NO_REPEAT);
end;
WHEN TIMER EXPIRED
:global.user_home := webutil_clientinfo.get_system_property('user.home');
end;
--Generate Keystore :
E:\DevSuiteHome_1\jdk\bin \keytool -export -alias myapp -keystore .keystore_myapp -rfc -file svm.cert
--Sign Jar File :
Oct 8, 2012
The main issue and largest question from customers is why do they get the following warning-
prompt-box:
Firstly, this issue can be completely bypassed by importing the certificate that the customer’s jar
files were signed with into the end-client’s JRE trusted certificates file (“trusted.certs”). No Java
Warning Prompt will occur once the certificate is loaded into the JRE. Steps on how to do this
are below. However doing this requires a customer’s system admin team to be involved, so they
can modify every one of their end-client’s JRE’s. Thus, the second recommendation.
Secondly, there will be times when an end-client can’t have their JRE loaded with the proper
settings without manual interaction. Thus actually clicking through the prompt. However, if the
any jar files are not signed with a X.509 Certificate, JRE’s default action is to cancel running the
jar file, thus interrupt Forms’ ability to run properly. Therefore, it is recommend to sign all jar
files with an X.509 Certificate, so that if this warning does occur, the user can be assured, that
the jar file has been signed with a certificate that is verified by a major Certificate Authority.
1. Retrieve Certificate File. If the customer is using X.509, the security or system admin will know
where this is. Once you have the file continue on to step 3. If you deployed jar files with a self-
signed certificate, continue onto step 2.
2. (Conditional step) Complete this step only if you sign your jar files with a self-signed certificate.
o Login to your application server where Forms runs.
o Open a command-line tool
o Verify your JDK’s bin directory path is in your PATH environment variable.
o Navigate to where your keystore is. If you don’t know where the certificate is and you
use sign_webutil.bat/sh, the location of the keystore will be in the sign_webutil script.
When looking in sign_webutil, retrieve your alias and keystore password as well.
o Run the following command to export the certificate from the keystore:
keytool -export -alias KeystoreAliasName -file NewCertificateFileName.crt -
keystoreNameOfKeystore.jks
o The command above will export your certificate to a certificate file.
3. Login to a end-client-machine that you wish to configure. Locate your “trusted.certs” file of your
JRE.
o For example, on Win 7, with username johndoe, the path would be
C:\Users\johndoe\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
o On Windows XP, with username johndoe, the path would be C:\Documents and
Settings\johndoe\Application Data\Sun\Java\Deployment\security (NOTE: If security
does not exist, the cache directory can also be used)
o NOTE: The AppData/Application Data directory is hidden. You may need to type it in the
taskbar on the top of Windows Explorer.
4. Copy the certificate to the filesystem on the client-machine
5. Open Command line on the client-machine
6. Navigate to the directory where the certificate is loaded.
7. Load Certificate into the JRE Trusted Certificates Store. See the following command example to
load the certificate into your JRE’s trusted certificate store:
o Windows 7: keytool -importcert -file CertificateFileName.crt -keystore
C:\Users\johndoe\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs -
storepass “” -noprompt -v
o Windows XP: keytool -import -file CertificateFileName.crt -keystore “C:\Documents and
Settings\johndoe\Application Data\Sun\Java\Deployment\security\trusted.certs” -
storepass “” -noprompt -v
8. The command above should load in the certificate successfully.
9. Test your changes.