If you think this is a bug, please enter an issue in JIRA. http://issues.appfuse.org/browse/APF
Thanks, Matt On Mon, Jul 6, 2009 at 5:54 AM, Dhanakumar <dhana.a...@gmail.com> wrote: > > Thanks Kannan Ekanath, > > The issue is, in AppFuse struts 2.0, > default package extends struts-default > My requirment is, it would be nice if params interceptor is just before the > prepare interceptor. to make condition check in prepare method easier. > > when I look on struts-default.xml, there is the correct order as I > required.i.e., params-prepare. > > I realized from your post, that creating a new stack is a very good idea. > for example, I can use MenuInterceptor in the new interceptor stack. > > Thanks for your reply. > > > Kannan Ekanath wrote: > > > > 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 > > > > > > -- > View this message in context: > http://www.nabble.com/About-Struts-2-params-and-prepare-interceptors-tp24353771s2369p24354096.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 > >