That's how I do it most of the time. If your POJO is in session scope, your Action won't even have to do anything.
I usually only use ActionForm when there's a corresponding HTML <form>. If I'm just displaying data on the page, I just pass the POJO. Hubert On 7/18/06, Mississippi John Hurt <[EMAIL PROTECTED]> wrote:
But what if my jsp page that I want to display the DAO info is a read only page ie. doesn't have an <html:form> element on it? Would I still populate the ActionForm and use it to display or would I just pass a regular POJO to jsp and use <bean:write> or jsp or scriptlet to display? On 7/18/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > On 7/18/06, Mississippi John Hurt <[EMAIL PROTECTED]> wrote: > > Hi, > > I know ActionForm can be used to transfer html-form-input-fields to the > > Action class. But what about the other way around? Can it be used to say > get > > a DAO object and transfer its properties to the ActionForm, which when > the > > request is forwarded to a jsp, is readily available or populates the > labels > > on the screen. > > Of course. See this for some insights: > http://wiki.apache.org/struts/StrutsManualActionClasses You can use > one action or two actions and just one actionform. The actionform acts > as I/O buffer. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]