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

Servlet - EJB - JSP

Dharini
Greenhorn

Joined: Jul 05, 2001
Posts: 1
Hi,
I have a form where I would be giving some details ( Ex Emp Id ) and when the form is submitted the control will go to the Controller Servlet where I would be retrieving the values entered in the first form. Now I want all the results from the database for the entered information and should be stored in a bean ( you suggest which to use wether an BMP Bean or a simple Bean ) and this bean would be used by another JSP file and display the results accordingly. Pl help me as to how I would be passing the information from one servlet to the Bean and how to get the values from the bean in the JSP file.
thanks in advance,
Dharini
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
"Dharini",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

You can use a simple JavaBean if data persistence is not required. For permanent storage, EJB's are better. For simple JavaBeans, you can use the useBean JSP tag and its relatives, EJB access presently requires some actual code, unless you wrap the EJB with a JavaBean that forwards get/set requests.
If you want to pass the data from JSP to JSP, you can maintain a simple bean as a session variable. An EJB can't be so simply managed, but you can save its handle in a session.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Servlet - EJB - JSP