java - Web application in jsp/servlets - localization using fmt:message -


I am writing a simple www application using jsp and servlet on Topicat 7.0. It's multilingual and I want to make all the messages out for easy translation. I'm trying to get it fmt: message tag This is my test page:

SimplePage.jsp

  & lt;% @ taglib uri = "http://java.sun.com/jsp/jstl/fmt "Prefix =" fmt "%> & Lt; Fmt: setLocale value = "en_US" scope = "applications" /> & Lt; Fmt: setBundle basename = "Localization. Message" var = "b" /> & Lt; Html & gt; & Lt; Body & gt; & Lt; Fmt: message key = "key1" bundle = "$ {b}" /> & Lt; / Body & gt;   

message_en_US.properties

  key1 = test   

The page's output is:

  ??? Key 1 ??? I have put message_en_US.properties in the source folder named "Localization". I have put it in Web-INF, WebContents and src (as well as changing the base name of bundle) - Results only one. I appreciate any help.   

If you have a source folder named localization> you can prefix it with localization do not require.

  & lt; Fmt: setbundle basename = "message" var = "b" />    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -