File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Servlet - EJB - JSP


Joined: Jul 05, 2001
Posts: 1
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,
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . 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.

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

Joined: Jun 25, 2001
Posts: 17417

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Servlet - EJB - JSP
It's not a secret anymore!