my dog learned polymorphism*
The moose likes Struts and the fly likes bean:message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:message" Watch "bean:message" New topic
Author

bean:message

vamsi nani
Greenhorn

Joined: Jun 14, 2006
Posts: 12
can any one explain the tag bean:message ? what is its significance ?
Samuel Cox
Ranch Hand

Joined: Nov 16, 2004
Posts: 96

One of its typical uses is for replacing labels via different resource files based on user locale. For instance, instead of having a jsp like:



You would have:



If you do it this way and you want to change Name to Nombre, it is done in one place and propagates throughout your jsp pages.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: bean:message
 
Similar Threads
struts 1 supports in using <bean:message> multiple times
bean taglib inside javascript
Struts
No getter method for property firstName
Simple Question about Bean