Hi to all. I'm developing a Struts 2 application and i create an
interceptor to initialize values and to validate user login. I want to
load a list to jsp to populate a s:select so i implemented the
Preparable interface in my action, and the method prepare(), so i type
the code in this method to get the list from DB. For that i supposed
that my custom interceptor will execute before the prepare method
because in my interceptor i initialize my connection that i use on
prepare(), but perpare() executes before that, so it gives me a
NullPointerException.
Then i googled about it and i found something about PrepareInterceptor,
so i defined in my interceptor stack after my own interceptor, like this:
<interceptor-stack name="appInteceptors">
<interceptor-ref name="initializeInterceptor" />
<interceptor-ref name="prepare" />
<!--<interceptor-ref name="permissionsInterceptor" />-->
<interceptor-ref name="defaultStack" />
</interceptor-stack>
But it doesn't work, because i tought that with the order change my
interceptor will execute before than action's prepare() method, but don't.
Somebody knows how to execute prepare() after a custom interceptor
execution?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org