• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get a default value in html:textarea from a properties file.

 
Satish Kumar
Ranch Hand
Posts: 85
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following in my jsp

<html:textarea cols="30" rows="4" name="disputeForm" property="strRemarks" value="Please type in your remarks for disputing here (up to 500 characters)"/>

I want the value to come from the applicationresources.properties.
I tried bean:message and fmt:message but it s not working.
Can somebody suggest if i am missin something.
 
Brent Sterling
Ranch Hand
Posts: 948
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sure you can do this in your JSP, but I would probably put the code to initialize this value in my Action class using code something like this:

ResourceBundle bundle = ResourceBundle.getBundle("application");
form.setStrRemarks(bundle.getString("DefaultDisputeRemarks"));

- Brent
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic