struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Law <andy....@roslin.ed.ac.uk>
Subject Some Spring/Struts questions
Date Wed, 12 May 2010 08:57:38 GMT

All,

Apologies if this would be better asked in a Spring forum. If so, I would
appreciate guidance as to which one/where.

I have a Struts2 application with around 30 actions. Most inherit from a
common base class. We have configured the system to start to use Spring to
inject certain things into certain places. This seems to work well and we
are all currently happy bunnies.

A new requirement means that we need to have available across pretty much
every action a separate, independent bean that carries information that may
(or may not) need to be displayed on the resulting web-pages. I am wondering
what the best way is to make this bean available to each JSP.

I'm happy with injecting certain beans into certain actions, but I'm not
clear what I should be injecting *this* bean into. Ideally it should just
pop into existence and be available to the JSPs without the Actions even
being aware that it is there. It's not part of the business logic and is
purely informational. If I have to make it available through the Actions
then I would *like* to be able to inject it into the common base class with
a single configuration and have that work automatically for all sub-classes
(and this would be a useful trick for some other places in the application)
but that does not seem to be possible unless I'm missing a trick?

How should I configure this, please?

Later,

Andy
-- 
View this message in context: http://old.nabble.com/Some-Spring-Struts-questions-tp28533505p28533505.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message