Request
路径:
http://localhost:5002/login/test
获取域名(即端口前面的内容):localhost
request.getServerName();
获取访问路径(即端口后面的内容):/login/test
request.getServletPath();
获取前台传递的值,存放形式为键值对,但是获取到的map只能读,不能写,如果想要操作的话
需要重新创建一个map,把获取的map值存放在新map中进行操作
request.getParameterMap();
修改request请求中参数的值,request为前台发送来的请求,map为更改参数后的参数,得
到新的请求wrapRequest
ParameterRequestWrapper wrapRequest = new ParameterRequestWrapper(httpRequest, map);