HttpServletRequest和ServletRequest都是接口
HttpServletRequest继承自ServletRequest
HttpServletRequest比ServletRequest多了一些针对于Http协议的方法。如getHeader
(String name),
getMethod
()
,getSession
() 等等。
他们对应的实现类:
javax.servlet.ServletRequestWrapper (implements javax.servlet.ServletRequest)
javax.servlet.http.HttpServletRequestWrapper (implements javax.servlet.http.HttpServletRequest)?