• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding JSP & Action Class handling

 
RamaSarma Vemuri
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My doubt is,
I have a JSP with some text fields. I have one database, and bean classes. I have to display some values in JSP, I have to retrieve those from database. I completed till getting collection from the database to the action class using EJBs. Now my problem is with the returning of values to JSP. How to code for returniong the values from action class to JSP.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35728
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RamaSarma,
Welcome to JavaRanch!

Have your Action class put the collection of values in the request (or session) as an attribute. In your JSP, you can the use jsp:useBean or bean:define to get the bean and then logic:iterate to loop through the collection.

For the future, there is a Struts forum farther down.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!