You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Shawn Sohl <SS...@HNTB.com> on 2001/08/09 18:59:02 UTC

Retrieving property fields in Action Class

I was wondering if there is a way to retrieve property field values in
Action classes.  Are .jsp pages the only place you can retrieve these
values.....I looked in the ActionErrors class to see how it retrieved the
values but couldn't find anything.

Thanks for any input.



Re: Retrieving property fields in Action Class

Posted by Ted Husted <hu...@apache.org>.
The best place to answer a question like this is the USER list, where
there are more people to help you. So I'll copy them in ;-)

But, yes, the ActionForm is passed to the perform() method of your
Action. 

The Action also has access to a protected servlet property (or
getServlet() method), that gives it access to the public properties of
the ActionServlet, so there isn't aren't any resorucres that you can use
on JSP that you couldn't use in an Action.

Shawn Sohl wrote:
> 
> I was wondering if there is a way to retrieve property field values in
> Action classes.  Are .jsp pages the only place you can retrieve these
> values.....I looked in the ActionErrors class to see how it retrieved the
> values but couldn't find anything.
> 
> Thanks for any input.

Re: Retrieving property fields in Action Class

Posted by Ted Husted <hu...@apache.org>.
The best place to answer a question like this is the USER list, where
there are more people to help you. So I'll copy them in ;-)

But, yes, the ActionForm is passed to the perform() method of your
Action. 

The Action also has access to a protected servlet property (or
getServlet() method), that gives it access to the public properties of
the ActionServlet, so there isn't aren't any resorucres that you can use
on JSP that you couldn't use in an Action.

Shawn Sohl wrote:
> 
> I was wondering if there is a way to retrieve property field values in
> Action classes.  Are .jsp pages the only place you can retrieve these
> values.....I looked in the ActionErrors class to see how it retrieved the
> values but couldn't find anything.
> 
> Thanks for any input.