File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Properties file read problem in struts-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Properties file read problem in struts-config.xml" Watch "Properties file read problem in struts-config.xml" New topic
Author

Properties file read problem in struts-config.xml

riddhi bhatt
Greenhorn

Joined: Jul 09, 2008
Posts: 12
I have declared in struts-config.xml, the following declaration:-

<message-resources parameter="resource.MessageResource" />

The location of the file is in JavaResource/resource

the jsp file trying to access it is in WebContent folder.

A brief code snippet is as follows:-



Any help is appreciated. I am new to struts.
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi Riddhi,

Try to put it into the web-inf folder.
Regards
Jatan
riddhi bhatt
Greenhorn

Joined: Jul 09, 2008
Posts: 12
jatan bhavsar wrote:Hi Riddhi,

Try to put it into the web-inf folder.
Regards
Jatan


Did it for the resource file but of no avail.... .
echarish Kumar
Ranch Hand

Joined: Feb 02, 2010
Posts: 42
What output are you getting on your page is it ??label.username?? , if you are getting this than it means your properties are not present in the properties file.
can you post complete code that you are using along with struts-config, jsp, and properties file.
 
 
subject: Properties file read problem in struts-config.xml
 
Similar Threads
Need a simple project in struts
configuring datasource for mysql in struts-config.xml
DATABASE ERROR: java.sql.SQLException: Invalid argument(s) in call
Ajax-Chat project
Struts Without Form Bean