String.format in JSP -


How can I get the same behavior as string.form (string, object ...) in JSP page? ? ? Are there any tag libraries / function libraries available for this purpose? I need something that provides a set of string strings and arguments

  & lt; Ns: tag source = "hi {0} {1}" argument = "substitutes 'name' as 'nickname'" />  

or

  $ {ns: func ("hi {0} {1}", "name ',' surname '"}} < / Code> 

In that result

  Hello surname  

Thanks for any suggestions, Stephano

You JSTL & lt; fmt: message & gt; Tags:

Pre> & lt; fmt: Message key = "the.message.key">

This internally uses java.text.MessageFormat , though.

Most Ua The e-framework also has its own version of such tag. / P>


Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -