aspose file tools*
The moose likes Struts and the fly likes getting placeholder value dynamically in struts 1.2.9 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "getting placeholder value dynamically in struts 1.2.9" Watch "getting placeholder value dynamically in struts 1.2.9" New topic
Author

getting placeholder value dynamically in struts 1.2.9

Abhishek Reddy
Ranch Hand

Joined: Mar 28, 2006
Posts: 259
How to get placeholder value dynamically in struts 1.2.9

for example:

i have a key in message resource file
---------------------
errors.required={0} is required
name=Name

-----------------------
Note: The place holder value also exist in the properties file
errors.add("name",new ActionMessage("errors.required","Name")); // here i have given place holder value "Name" directly....how do i get this from the properties file.



Abhishek
Lei Guoguo
Greenhorn

Joined: Mar 31, 2009
Posts: 26
you can give the placeholder in the jsp page by this tag <html:errors />

if you not assign any attribute in this tag, you will get all errors message.
if you want to get property designated, you can use the attribute "property" like this
<html:errors property="name" />


I'm a chinese, my english is so bad, I need help. If you want to help me, you can send your question to my e-mail: lgg860911@yahoo.com.cn, I will help you, and improve my english. Thanks everyone.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting placeholder value dynamically in struts 1.2.9