This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding JSP & Action Class handling  RSS feed

 
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: 37180
515
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!