Can Struts 1.x Resource Bundles be placed elsewhere than the classes directory?

Ultimately, the answer is yes. You can play some interesting games by configuring a custom className and/or factory and get messages however you want (including from a database) and so on. This allows you to customize whatever you want.

Ultimately, the answer is yes. You can play some interesting games by configuring a custom className and/or factory and get messages however you want (including from a database) and so on. This allows you to customize whatever you want*.

I agree the resources aren't a class, but putting them on the classpath is a common practice, and allows resources to be loaded as a resource, e.g. , from inside a jar. I'm sympathetic, but I'd leave it as-is. *Like reversing all the text; a fun prank to play on your co-workers and QA department.

Its best leave it on the classpath. It's stadard practise to include properties files on the classpath, especially if you're planning on packaging it up in your WAR/EAR. You're keeping it under WEB-INF so you gain no benefit from moving it off the classpath, and you'll just confuse other developers who have to work on the project and you've had to put a hack in to make this work.

If you want to keep your files external to your deployable WAR/EAR then that's a valid reason for not using the classpath. Typically this will require some configuration as part of your deployment to specify where the file is to reside. For example specify the location using a JVM argument (e.g. -Dprops.

File=/config/myapp. Properites) lookup from a JNDI resource use a PropertiesFactoryBean if you're using the Spring framework (I use Spring's ApplicationContext with Struts 1 MVC) read properties from a database writing your own ApplicationPropertiesDAO class that initialises itself durnig your applications bootstrap process (e.g. Spring application contact, Servlet in web. Xml, Listener in web.

Xml, etc).

Ultimately, the answer is yes. You can play some interesting games by configuring a custom className and/or factory and get messages however you want (including from a database) and so on. This allows you to customize whatever you want*.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions