• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting placeholder value dynamically in struts 1.2.9

 
Abhishek Reddy
Ranch Hand
Posts: 259
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Lei Guoguo
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" />
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic