Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet - EJB - JSP

 
Dharini
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17639
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic