aspose file tools*
The moose likes Struts and the fly likes How to get a default value in html:textarea from a properties file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to get a default value in html:textarea from a properties file." Watch "How to get a default value in html:textarea from a properties file." New topic
Author

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

Satish Kumar
Ranch Hand

Joined: Oct 16, 2006
Posts: 85
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

Joined: Feb 08, 2006
Posts: 948
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
 
subject: How to get a default value in html:textarea from a properties file.