Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use intenationalization in Tag class

 
Santana Iyer
Ranch Hand
Posts: 335
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

  •  
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic