*
The moose likes Struts and the fly likes what is use of application resource properties in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "what is use of application resource properties in struts" Watch "what is use of application resource properties in struts" New topic
Author

what is use of application resource properties in struts

saswat rashmi
Greenhorn

Joined: Jul 31, 2007
Posts: 14
hi everyone

can i anyone tell me what is the use of ApplicationResource properties.

and when creating struts project it is coming by default .can i change that

com.myapp.struts in source folder
vive shar
Greenhorn

Joined: Sep 27, 2007
Posts: 17
hi,

First see the example of ApplicationResource.properties :
# Sample ResourceBundle properties file
errors.header=<h4>Validation Error(s)</h4><ul>
errors.footer=</ul><hr>

error.lastName=<li>Enter your last name
error.address=<li>Enter your address
error.age=<li>Enter your age

The major advantage of this file is if your client says to change the text like in place of 'Enter your last name' to 'Last Name' you need to change at one place and you need not make any changes in the code.Suppose many jsps are using this so one place change will reflect everywhere. But if you hard code 'Enter your last name' on the jsp pages. On all the jsp pages you will have to make changes.

For your second question Please check out the following link.
http://www.javapassion.com/handsonlabs/strutsbasics/

Thanks,
Vivek
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Also see this current thread: http://www.coderanch.com/t/57087/Struts/resource-bundle-file-used-often

- Brent
 
Consider Paul's rocket mass heater.
 
subject: what is use of application resource properties in struts
 
Similar Threads
Creating Nested FormBean using DynaActionForm
how to call properties file in an application
How To Access struts Properties file
Struts action form properties
DynaValidatorForm values in JSPs