· First write the Session bean.: No need to write the session bean home and remote as they are provided by lead.
· Then prepare Meta-Inf folder in same folder as that of .java file.
· Prepare ejb-jar.xml in meat-inf:
· Then prepare weblogic-ejb-jar.xml file in meta-inf
· Now from the current directory run
javac -d .*.java //This will create class file with full package structure with the .class file
jar –cvf0 pdmController.jar *.java META-INF
java weblogic.ejbc pdmController.jar pdmControllerBean.jar
Then deploy this bean using the console of the weblogic.
Put the class file of the controller in C:\Lead2.0\sampleapplication\LeadExample\WEB-INF\classes with complete folder structure as that of the package.
· Create the form handler servlet and put the clas file in C:\Lead2.0\sampleapplication\LeadExample\WEB-INF\classes with complete folder structure as that of the package.
· In web.xml of C:\Lead2.0\sampleapplication\LeadExample\WEB-INF put following for formhandler
In Each request ID for that form handler must be here else parameter ot defined IPE0001 exception.
· In the html invoking the request
· In response map
· In leadtry.jsp
This out put XSL for the request.
· In TaskManager, this is for the form handler.
The request ID as given in input.html The response ID as mentioned in response map. The command ID is used in formhandler’s process() switch case, controller execute() switch case. And in task manager.
· In server task manager for Controller.
· Entity bean:
3files + ejb-jar.xml, weblogic-cmp-rdbms-jar.xml, weblogic-ejb-jar.xml
'-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB RDBMS Persistence//EN'
put the 3 xmls in Meta-inf.
Then run the three commands as that of session bean to create deplayable jar, and deplay it using weblogic console.
This will produce following entry in config.xml of weblogic
If the path is wrong correct the path yourself by modifying this file.
The pool entry for the database is:
Targets="myserver" TestTableName="Product_Master" URL="jdbc:oracle:thin:@172.25.5.97:1521:SAMPLE"/>
· For this the tnsname.ors of the oracle/network/admin should have the entry
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.25.5.97)(PORT = 1521))
(SERVICE_NAME = sample.lntinfotech.com)
This can be created using the net8 config assistant.
· If this does not work :
The winnt/System/drivers/etc/Hosts should have the entry of
172.25.5.97 selva.lntinfotech.com //name of the pc and domain name