使用@RequestParam注解进行参数绑定。
web.xml
1 | <?xml version="1.0" encoding="UTF-8"?> |
springmvc-config.xml
1 | <?xml version="1.0" encoding="UTF-8"?> |
UserController.java
1 | package org.zhangxueliang.controller; |
registerForm.jsp
1 | <%@ page language="java" contentType="text/html; charset=UTF-8" |
loginForm.jsp
1 | <%@ page language="java" contentType="text/html; charset=UTF-8" |
welcome.jsp
1 | <%@ page language="java" contentType="text/html; charset=UTF-8" |