This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi, How do I call an EJB from a JSP? I have an ejb deployed on Weblogic and which runs fine from a stand alone java client. I would like to run it from the web using jsp. Not sure what the code needs to look like. I want it so that anyone with a browser can hit it. sample code appreciated... many thanks, steve
I do not have the sample code you asked for, however I think you should use some kind of JSP-Servlet-EJB model for your project. ie. using JSP for front end presentation, using servlet program as controller and using EJB as application logic, this fits the so called "MVC"-Model-View-Controller pattern. The details as to how to invoke servlet from JSP and return back to JSP from servlet are quite simple and straightforward. You can find it in nay JSP book. You can invoke your EJB session bean from your servlet code and through the session facade to do all business logic stuff. Hope this helps. Tieyi
Joined: May 23, 2001
Thanks, I'm using the MVC 5 layered architecture. I was just looking for some jsp code to call the ejb. Steve