FWIW, these are all specific Struts 2 issues and not appfuse issues per se.
So you are better off asking in Struts 2 mailing lists?

2009/7/6 Kannan Ekanath <kannan.ekan...@gmail.com>

> Dhanakumar,1) Struts offers various sets of interceptors. One of them must
> be params-prepare-params (params is called twice). For these requests in
> question you could use that interceptor stack.
> 2) It is not advisable to change the struts.xml for standard interceptor
> sets. Instead create another stack "my-stack" and change whatever you want
> with it :)
>
> Helps?
>
> 2009/7/6 Dhanakumar <dhana.a...@gmail.com>
>
>
>> Hi Matt,
>>
>> in struts.xml, i can see the order of interceptor references, like as
>> follows
>> ...
>> <interceptor-ref name="prepare" />
>> <interceptor-ref name="params" />
>> ...
>> in prepare method, my code is
>> public void prepare() {
>>          if(null != getRequest.getParameter("id")) {
>>                  Employee =
>> employeeManager.get(Long.parseLong(getRequest.getParameter("id"));
>>          }
>> }
>>
>> if i change the order of interceptors to be called, such as follows.
>> <interceptor-ref name="params" />
>> <interceptor-ref name="prepare" />
>>
>> First params interceptor is called and then prepare interceptor.
>>
>> Then my code in prepare method would be simple,like as follows.
>>
>> public void prepare() {
>>          if(null != id) {
>>                  Employee = employeeManager.get(id);
>>          }
>> }
>>
>> because of params interceptor, setter methods fo request parameters are
>> called, and hence I am able to check for null of id.
>>
>> Is this the Good approach to change the interceptors order in struts.xml ?
>>
>> Thanks,
>> Dhana kumar Anem.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/About-Struts-2-params-and-prepare-interceptors-tp24353771s2369p24353771.html
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
>> For additional commands, e-mail: users-h...@appfuse.dev.java.net
>>
>>
>
>
> --
> Regards,
> Kannan Ekanath
>



-- 
Regards,
Kannan Ekanath

Reply via email to