J. Patrick Bedell wrote:
Hello,
  Sorry for what is surely a FAQ from a struts newbie...
  I'm trying to make a complex object available to my JSP so that
code in the JSP can access subobjects within the original object (it's
an Amazon Item object generated with XMLBeans).  What is the right way
to make such an object available to the View jsp after the Action has
prepared it?  If I was using simple servlet processing, I would use
request.setAttribute("name", object) in the servlet and
request.getAttribute("name") to access the object within the JSP.  Is
there a similar process for Struts?

The process you describe will work just as well with Struts. However, if you want to be able not just to display the data but to support editing of it, you will probably want to be using the ActionForm mechanism to support round-trip display-edit-validate-redisplay and get the full benefit of the Struts 'form' tags, validation framework, etc. For display-only, though, the approach you describe is just fine.

L.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to