From 09d9cf26b41156fe807f22d2acce231d6b087650 Mon Sep 17 00:00:00 2001 From: Ivan Date: Wed, 2 Mar 2016 14:57:33 +0100 Subject: [PATCH] Add form tag example --- spring-mvc-xml/src/main/resources/messages.properties | 2 +- .../src/main/webapp/WEB-INF/view/personForm.jsp | 10 ++++++++-- spring-mvc-xml/src/main/webapp/WEB-INF/web.xml | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/spring-mvc-xml/src/main/resources/messages.properties b/spring-mvc-xml/src/main/resources/messages.properties index 2a187731ae..2a3cccf76c 100644 --- a/spring-mvc-xml/src/main/resources/messages.properties +++ b/spring-mvc-xml/src/main/resources/messages.properties @@ -1,2 +1,2 @@ -NotEmpty.person.name = Name is required! +required.name = Name is required! NotEmpty.person.password = Password is required! \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/view/personForm.jsp b/spring-mvc-xml/src/main/webapp/WEB-INF/view/personForm.jsp index 9b0a78899c..79bda7c17d 100644 --- a/spring-mvc-xml/src/main/webapp/WEB-INF/view/personForm.jsp +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/view/personForm.jsp @@ -12,6 +12,12 @@ color: #ff0000; } + .errorbox { + + background-color: #ffEEEE; + border: 2px solid #ff0000; + } + @@ -20,13 +26,13 @@ - + - + diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml b/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml index 4e38b2fae6..a39c4fdd3a 100644 --- a/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml @@ -29,7 +29,7 @@ org.springframework.web.servlet.DispatcherServlet1 - C:/Users/ivan/Desktop/tmp + /tmp
Name
E-mail