Spring MVC参数绑定相关注解:
@PathVariable
@RequestHeader
@CookieValue
web.xml
1 | <?xml version="1.0" encoding="UTF-8"?> |
springmvc-config.xml
1 | <?xml version="1.0" encoding="UTF-8"?> |
DataBindingController.java
1 | package org.zhangxueliang.controller; |
SessionAttributesController.java
1 | package org.zhangxueliang.controller; |
User.java
1 | package org.zhangxueliang.domain; |
loginForm.jsp
1 | <%@ page language="java" contentType="text/html; charset=UTF-8" |
welcome.jsp
1 | <%@ page language="java" contentType="text/html; charset=UTF-8" |