Oh, so that means there is no point to define the params interceptor in
Action mapping (as seen below) because it's included in struts-default.xml?

<action name="someAction" class="com.examples.SomeAction">
    <interceptor-ref name="params"/>
    <result name="success">result.jsp</result>
</action>


On Mon, Nov 26, 2012 at 2:13 PM, Chris Pratt <thechrispr...@gmail.com>wrote:

> Well, not implicitly, but by default.  It is included in the struts-default
> stack.
>   (*Chris*)
>
>
> On Sun, Nov 25, 2012 at 11:01 PM, Wu Ming <rdyf4e...@gmail.com> wrote:
>
> > So is that means struts 2 is using params interceptor implicitly?
> >
> >
> > On Mon, Nov 26, 2012 at 10:12 AM, Chris Pratt <thechrispr...@gmail.com
> > >wrote:
> >
> > > 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 <rdyf4e...@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 <
> thechrispr...@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 <rdyf4e...@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.
> > > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to