struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@attws.com>
Subject RE: Message Resource file location in war file.
Date Thu, 24 Oct 2002 00:52:49 GMT
> -----Original Message-----
> From: Christian Nelson [mailto:cnelson@slac.com]
> Sent: Wednesday, October 23, 2002 5:51 PM
> 
> I'm trying to use Message Resources in my web application, 
> but I can't get
> struts to find the resources.properties file.  This is how 
> I'm trying to
> structure my web-application:
> 
> Note: "aaw" is the top-level directory.
> 
> aaw/WEB-INF/resources.properties	// note this line.
> aaw/WEB-INF/classes
> aaw/WEB-INF/classes/<all of my classes>
> 
> Now, what do I set the <message-resources .../> tag/parameter to in my
> struts-config.xml so that the resources.properties file above will be
> found???
> 
> All of the examples I'm finding have that file in some strange (to me)
> location, like "src/..." or "classes/...".  Can't I just have 
> in at the
> top-level of the WEB-INF directory???

The properties file is loaded just like a class (in fact, it could even be a
class), so it has to be in the classpath of the application.  The best and
most common way to do that is to put it in the "WEB-INF/classes" directory.

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


Mime
View raw message