aspose file tools*
The moose likes Struts and the fly likes how to use intenationalization in Tag class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to use intenationalization in Tag class" Watch "how to use intenationalization in Tag class" New topic
Author

how to use intenationalization in Tag class

Santana Iyer
Ranch Hand

Joined: Jun 13, 2005
Posts: 335
I have made my own tag class.

Inside doStartTag() I want to display message.

out.print("<bean:message key='Label.Filter'>");

but it is not working? what to do.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'd suggest the following:
  • Make your tag class extend org.apache.struts.taglib.bean.MessageTag
  • Download the source for the version of Struts that you're using
  • In your doStartTag, either copy their code to display a message or call super.doStartTag()
  • Add your code to do whatever it is you want to do in addition to displaying the message.


  • Merrill
    Consultant, Sima Solutions
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: how to use intenationalization in Tag class