• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing an object from Action to jsp

 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

How can we pass an object from Action class to view(jsp) .Using HttpSession we can do.Apart from this one how can we do??

Thanks in advance.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in Struts, the main mechanism for passing information between the JSP and the Action class is the ActionForm. You define properties on this JavaBean representing the information you want passed and you will generally put information into the ActionForm by calling one of it's setter methods. You can then retrieve the information using <bean:write> tags in your JSP. You can specify in the Action mapping you define in your struts-config.xml file whether you want the scope of the ActionForm to be session or request. The default is session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic