aspose file tools*
The moose likes BEA/Weblogic and the fly likes Calling EJB in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Calling EJB in JSP" Watch "Calling EJB in JSP" New topic
Author

Calling EJB in JSP

raja srinivas
Greenhorn

Joined: Jun 22, 2001
Posts: 20
Hi guys,
i am facing trouble in calling my ejb from the jsp's. I think its due to the fact that there is something wrong with the path that i set in the weblogic server in the Weblogic.xml file. Can someone please preovide me the corect syntax of writing the location there. (that is , java:comp/env/ejb... part). Can anyone please explain me that part.
Thanks
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,
You should consider that if your jsp is not package in an ear file with the ejb you should package the remote and home interfaces from your ejb in the war file for the jsp, also if your jsp is not in a war file you should provide acces to that interfaces for the jsp otherwise it´┐Żll not find them.
regards.
raja srinivas
Greenhorn

Joined: Jun 22, 2001
Posts: 20
Hi,
yeah..but write now i am in the development stage, so i dont want to create a .ear file everytime i add a new jsp. Weblogic says "arrange the resources(JSP's, static files etc) in the prescribed directory format....write web.xml...."
the error i am getting is
"java.io.IOException: CreateProcess: /bin/javac.exe -classpath C:\bea\wlserver6.0\config\mydomain\applications\DefaultWebApp_myserver;C:\bea\wlserver6.0\.\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\lib\ejbtags.jar;C:\bea\wlser ver6.0\.\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\classes;C:\bea\wlserver6.0\.\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myse rver_DefaultWebApp_myserver;C:\bea\wlserver6.0\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver;C:\bea\jdk130\jre\lib\r t.jar;C:\bea\jdk130\jre\lib\i18n.jar;C:\bea\jdk130\jre\lib\sunrsasign.jar;C:\bea\jdk130\jre\classes;.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;null -d C:\bea\wlserver6.0\.\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver C:\bea\wlserver6.0\.\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_test.java error=3D
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:66)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:551)
at java.lang.Runtime.exec(Runtime.java:477)
at java.lang.Runtime.exec(Runtime.java:443)
at weblogic.utils.Executable.exec(Executable.java:144)
at weblogic.utils.Executable.exec(Executable.java:108)
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:555)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:354)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:359)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:180)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:148)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
"
Any clues ???
Thanks
Raja Srinivas
Ashwin Gupta
Greenhorn

Joined: Mar 05, 2003
Posts: 1
Hi ,
I was also in same trouble...So u take following steps (in WebLogic 7.0)
(1) Add Client Jar of ur EJb in Web Application folder & make a war file(not Deployed).
(2) Now take ejb JAR file of ur EJB & take above war file into EAR file & deploy that EAR file on WLS7.0.
(3) path should be on Browser
http://hostString ort/(Name of WAR file)/(html or JSP page name)
Ashwin
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1850
Hi Raja
Could you please provide the JNDI lookup name that you provided in the xml file.
The problem could be that you have not put in the correct jndi name.
Br
Rahul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling EJB in JSP