Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is use of application resource properties in struts

 
saswat rashmi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also see this current thread: http://www.coderanch.com/t/57087/Struts/resource-bundle-file-used-often

- Brent
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic