i18n translation in JSP custom tag
问题 Is it possible to write a custom JSP tag to take an i18n message key and output the translation phrase for the given request? Normally in JSP/JSTL, I do: <fmt:message key="${messageKey}"><fmt:param>arg1</fmt:param></fmt:message> And I get the translation phrase. Now I need to do the following (there's a good reason for this): <custom:translate key="${messageKey}" arg="arg1"/> But I don't know how to look up the translation in the custom tag code. The TagSupport base class provides a