The HttpServletRequest interface inherits from ServletRequest, which is a more specific abstraction of the ServletRequest for the HTTP protocol. HttpServletRequest is typically implemented by server providers such as Tomcat,jboss, and we do not need to be concerned with their implementation logic. So the general website application development use to HttpServletRequest can.
ServletRequest is designed for multiple protocols, and the current mainstream is the HTTP protocol.
==========
HttpServletRequest and ServletRequest are all interfaces.
HttpServletRequest inherited from ServletRequest
HttpServletRequest has more methods than ServletRequest for the HTTP protocol.
Such as
GetHeader (String name),
GetMethod (),
GetSession ()
Wait a minute.
They correspond to the implementation class:
Javax.servlet.ServletRequestWrapper (Implements Javax.servlet.ServletRequest)
Javax.servlet.http.HttpServletRequestWrapper (Implements Javax.servlet.http.HttpServletRequest)
07.httpServletRequest servletrequest Relationship