You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ivan Žučenko <zu...@gmail.com> on 2007/10/30 13:40:14 UTC

how Action Tag may access actionContext of the surrounding Action?

Hi all,
I am quite new to s2 but like the framework but can not find the right way
how ActionTag may cooperate with surrounding Action. Well more exactly I
want Interceptors mapped to ActionTag use some objects prepared by
Interceptors of the Action. May be example would be best.
I have Interceptor which opens and later closes JDBC or Hibernate
connection.
This is maped to action (and if this Action implements some cusom interface
like.. ConnectionAware eg it injects reference to connection there...). Then
action is forwarded to jsp which contains several ActionTags.
I want those tags to use this connection too and in similar way by being
injected into tham.. so they implement this "flag" interface too. AND here
is core of problem, I want to create interface which would be lightweight
version of previous connection opening/closing one. It just FINDS that
connection .. somewhere in ValueStack (THIS IS I DO NOT KNOW HOW) and
injects it into actionTag's Action..

I hope I have explained this right... I really tryed several hours google
around for solution... so sorry for bothering
BR
Ivan