You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ma...@zte.com.cn on 2012/11/26 05:43:36 UTC

答复: Re: What is the effect of Params Interceptor?

good.

---------------------------------
毛凯
电话:13550048126
邮件:mao.kai23@zte.com.cn 
---------------------------------

 



Chris Pratt <th...@gmail.com> 
2012-11-26 11:12
请答复 给
"Struts Users Mailing List" <us...@struts.apache.org>


收件人
Struts Users Mailing List <us...@struts.apache.org>
抄送

主题
Re: What is the effect of Params Interceptor?






Request parameters refers to the data that is supplied with the GET query
string or POST body (typically from form parameters).  And the Params
Interceptor takes those parameters and calls the corresponding mutators on
the Action.
  (*Chris*)


On Sun, Nov 25, 2012 at 3:40 AM, Wu Ming <rd...@gmail.com> wrote:

> Hi,
>
> Is Request Parameters has same meaning with the Action's property field
> (the one with getter/setter) ?
>
> For example:
> http://www.tutorialspoint.com/struts_2/struts_actions.htm
>
> HelloWorldAction has "name" property. Then in index.jsp, there is a form
> that has "name" textfield data that will be sent to the HelloWorldAction 
if
> the submit button is clicked. So, in this case, could the "name" 
textfield
> data can be called as a Request Parameter if it is being submitted to
> the HelloWorldAction?
>
>
>
> On Sun, Nov 25, 2012 at 6:20 PM, Chris Pratt <thechrispratt@gmail.com
> >wrote:
>
> > Params interceptor is used in Injecting the Request Parameters into 
the
> > Action, either individually or (using the ParameterAware interface) 
all
> at
> > once.
> >   (*Chris*)
> >
> >
> > On Sun, Nov 25, 2012 at 3:07 AM, Wu Ming <rd...@gmail.com> wrote:
> >
> > > I read this tutorial<
> > > http://www.tutorialspoint.com/struts_2/struts_interceptors.htm>,
> > > but I don't understand what Params Interceptor is used for?
> > >
> > > Example:
> > >
> > > <action name="someAction" class="com.examples.SomeAction">
> > >     <interceptor-ref name="params"/>
> > >     <result name="success">result.jsp</result>
> > > </action>
> > >
> > >
> > > If the timer interceptor being used, we will see this kind of 
message:
> > >
> > > *INFO: Executed action [//hello!execute] took 109 ms.*
> > >
> > >
> > > But what about params interceptor? What would happened if it's used? 
I
> > > tried and don't see anything.
> > >
> >
>


--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s).  If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited.  If you have received this mail in error, please delete it and notify us immediately.