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

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -