java - Spring form errors from property file -


I am using the Spring Form tag library and I want my message error messages to be taken from some messages. Properties file, I jsp:

  & lt; Form: form method = "post" action = "" commandName = "client" & gt; & Lt; Form: Input path = "name" /> & Lt; Form: Errors Path = "Name" & gt; & Lt; Input class = "button" type = "submit" value = '& lt; Fmt: message key = "login.submit" /> & gt; & Lt; / Form: Form & gt;   

The value of the Submit button is loaded from some message / source file (& lt; fmt: message key = "login.submit" />), and
I want my error message to be loaded from there, I have tried the following, but it does not work:

  & lt; Fmt: message key = '& lt; Form: errors path = "name" & gt; '/ & Gt;   

This simply gives returns ??????

You can do this as you are trying to do nest JSP tags ( Although you can put a JSP tag inside the HTML tag), but the AFAIK form: errors tag will get the message from the spring message anyway. Only

  & lt; Form: errors path = "name" & gt;   

Without & lt; Fmt: Message ... Bit.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -