add.jsp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <%@ include file="/WEB-INF/jsp/include.jsp" %>
  2. <html>
  3. <head><title>Add New Contact</title></head>
  4. <body>
  5. <h1>Add Contact</h1>
  6. <form method="post">
  7. <table width="95%" bgcolor="f8f8ff" border="0" cellspacing="0" cellpadding="5">
  8. <tr>
  9. <td alignment="right" width="20%">Name:</td>
  10. <spring:bind path="webContact.name">
  11. <td width="20%">
  12. <input type="text" name="name" value="<c:out value="${status.value}"/>">
  13. </td>
  14. <td width="60%">
  15. <font color="red"><c:out value="${status.errorMessage}"/></font>
  16. </td>
  17. </spring:bind>
  18. </tr>
  19. <tr>
  20. <td alignment="right" width="20%">Email:</td>
  21. <spring:bind path="webContact.email">
  22. <td width="20%">
  23. <input type="text" name="email" value="<c:out value="${status.value}"/>">
  24. </td>
  25. <td width="60%">
  26. <font color="red"><c:out value="${status.errorMessage}"/></font>
  27. </td>
  28. </spring:bind>
  29. </tr>
  30. </table>
  31. <br>
  32. <spring:hasBindErrors name="webContact">
  33. <b>Please fix all errors!</b>
  34. </spring:hasBindErrors>
  35. <br><br>
  36. <input type="hidden" name="<c:out value="${_csrf.parameterName}"/>" value="<c:out value="${_csrf.token}"/>"/>
  37. <input name="execute" type="submit" alignment="center" value="Execute">
  38. </form>
  39. <a href="<c:url value="../hello.htm"/>">Home</a>
  40. </body>
  41. </html>