Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes Pass JSP input variables to an EJB. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Pass JSP input variables to an EJB." Watch "Pass JSP input variables to an EJB." New topic
Author

Pass JSP input variables to an EJB.

steve dowdall
Ranch Hand

Joined: May 23, 2001
Posts: 36
Hi,
Can someone explain to me a little on how I would go about capturing three variables, say , name,userid, and doctype from a JSP page and pass them to an EJB for processing. Kinda new to the JSP thingie...
Steve
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Here's a tutorial from Sun that uses a JavaBean as a facade (or is it proxy?) to an EJB. The JSP then uses the useBean methods.

You were talking about the other way around, from JSP -> EJB, but perhaps this will give you a starting point?
http://java.sun.com/j2ee/sdk_1.2.1/techdocs/guides/ejb/html/Client5.html#10649
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

Or you could cheat. http://www.mousetech.com/EJBWizard.html
I haven't formally announced it yet (or maybe that just did), but I've posted a new production release - 3.4.0. The EJBWizard is a template-based RAD generator for Enterprise JavaBeans. In addition to generating the core code for EJBs, it also creates prototype JSPs that access them.
There are 2 JSPs generated by the supplied templates - a detail view/edit bean which works in conjunction with a support class that probably will be rewritten to be JavaBean (it really already is, except for the packaging) and a collection view, which accesses the EJBs more directly.
The 3.4.0 release supports WebLogic 6.1 and (I HOPE!) now provides the templates for JBoss that were missing from earlier releases. It's available from the ftp.mousetech.com site.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pass JSP input variables to an EJB.
 
Similar Threads
Combining JSP-Servlets-javaBean
how to pass parameters frm Midlet to JSP
pass request variables to frames
Passing variables
What should the Form action do for EJB call?