I think it is a great place for plugin ;-)
You can use interceptor with connected interface as e.g.
ServletConfigInterceptor and RequestAware - interceptor will read the
config files and then it will apply them to actions implementing given
interface. You can have many interfaces to distinguish di
Hello ,
I have the same request.
Perhaps the response can help you
You can use Interceptor#init()
http://struts.1045723.n5.nabble.com/Struts2-and-JDBC-How-to-read-jdbc-properties-only-once-for-100-or-1000-users-td5714995.html
Le Mardi 7 janvier 2014 10h17, Giuliano Catrambone
a écrit :
H
> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2004 12:26
> To: Struts Users Mailing List
> Subject: RE: application configuration
>
>
> I tend to put such things in XML files rather than properties files
> nowadays.
>
&
I'll give you a good reason... file access inevitably risks
IOExceptions, and exceptions don't propogate well from a static block.
That is to say, when the ClassLoader invokes the static block, it is
not invoked from within your code. The exception gets thrown and propogates
throu
seems like a bad idea to
me.
-Original Message-
From: Kailash Vasani [mailto:[EMAIL PROTECTED]
Sent: Thursday, 8 July 2004 20:45
To: 'Struts Users Mailing List'
Subject: RE: application configuration
Hi Viral & Andrew,
I dont have more information, but assumption is that
7;Struts Users Mailing List'
> Subject: RE: application configuration
>
>
> Plugin approach has some disadvantages, namely, it gets
> invoked for all the
> HTTP GET / POST requests,
> that includes GET issued for things like images, CSS files etc.
>
gets called exactly
once (assuming that you dont have
class loader related maze :-)
Kailash
-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 5:54 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: application configuration
Vi
I have coded something similar to this but rather than pop the properties object in to
the context I attached it to ThreadLocal.
Chris McCormack
-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: 08 July 2004 12:26
To: Struts Users Mailing List
Subject: RE: application
]>
Sent: Thursday, July 08, 2004 8:01 AM
Subject: RE: application configuration
> Thats one approach. The other is to use a struts plugin.
> I guess its a matter of taste. My personal preference is for plugins but
> either way also can.
>
> Just implement the org.apache.struts.P
AIL PROTECTED]
> Sent: Thursday, July 08, 2004 8:01 AM
> To: Struts
> Subject: RE: application configuration
>
>
> Thats one approach. The other is to use a struts plugin.
> I guess its a matter of taste. My personal preference is for
> plugins but
> either way a
)
-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, 8 July 2004 19:56
To: Struts Users Mailing List; [EMAIL PROTECTED]
Cc: Nilesh Suresh Rajurkar
Subject: RE: application configuration
I have a java file which read few properties file and put the key and
values read from
Users Mailing List
Subject: RE: application configuration
I tend to put such things in XML files rather than properties files
nowadays.
When the app starts up I have a plugin read the files and create
configuration objects (using Digester), and put these objects into the
servlet context
Please can you give some example code for this
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I tend to put such things in XML files rather than properties files
nowadays.
When the app starts up I have a plugin read the files and create
configuration objects (using Digester), and put these objects into the
servlet context (application scope) where my code can get at them easily.
-Ori
14 matches
Mail list logo