Hi all,
Referring to this page:
http://struts.apache.org/2.2.1/docs/selecting-template-directory.html
It says the template directory can be specified in the session, for example to
allow the user to change it on a per-session basis. I've been trying to do this
for my application, but can't get
In struts 1, I used org.apache.struts.action.PlugIn as a way to create an
object at web app startup and put it into the application context so that all
sessions had access to it. What's the equivalent method in Struts2? That is,
how can I have an object created at web application startup.
I
You should have an initialization servlet run at startup that can create such
an object.
Scott Smith ssm...@mainstreamdata.com 11/10/2011 3:06 PM
In struts 1, I used org.apache.struts.action.PlugIn as a way to create an
object at web app startup and put it into the application context so
Look into the ServletContextListener interface. It's a nice way to
initialize/dispose of one-time resources in any web app, Struts or not.
(*Chris*)
On Thu, Nov 10, 2011 at 12:06 PM, Scott Smith ssm...@mainstreamdata.comwrote:
In struts 1, I used org.apache.struts.action.PlugIn as a way to
You could take advantage of struts dependency injection [1].
You can use servlet filter or something else.
Generally this kind of things are easy to realize thank to the
interceptors facility.
[1] http://struts.apache.org/2.x/docs/bean-configuration.html
Maurizio Cucchiara
On 10 November
I think lazy initialization is a simple choice, because it is not
dependent on the J2EE container, this make your code easy to test.
If you worry about duplicated-initialization triggered by multi
request, the simple solution is, make your initialization code
[synchronized], using reserved word
The better solution is dependency injection with Spring, use the
struts2-spring-plugin.
On Thu, 2011-11-10 at 15:09 -0500, Eric Reed wrote:
You should have an initialization servlet run at startup that can create such
an object.
Scott Smith ssm...@mainstreamdata.com 11/10/2011 3:06 PM
The better solution is dependency injection with Spring, use the
struts2-spring-plugin.
On Thu, 2011-11-10 at 15:09 -0500, Eric Reed wrote:
You should have an initialization servlet run at startup that can create such
an object.
Scott Smith ssm...@mainstreamdata.com 11/10/2011 3:06 PM
8 matches
Mail list logo