Servlet API介绍
javax.servlet和javax.servlet.http包包含了Servlet Api的接口和类。
javax.servlet中包含由Servlet或Web容器中使用的许多接口和类。这些不是特定于任何协议的。
该javax.servlet.http包包中包含负责HTTP请求只有接口和类。
接着,我们看看javax.servlet包的接口有哪些?
1 javax.servlet包中的接口
javax.servlet包中有许多接口。它们如下:
- Servlet
- ServletRequest
- ServletResponse
- RequestDispatcher
- ServletConfig
- ServletContext
- SingleThreadModel
- Filter
- FilterConfig
- FilterChain
- ServletRequestListener
- ServletRequestAttributeListener
- ServletContextListener
- ServletContextAttributeListener
2 javax.servlet包中的类
javax.servlet包中有许多类。它们如下:
- GenericServlet
- ServletInputStream
- ServletOutputStream
- ServletRequestWrapper
- ServletResponseWrapper
- ServletRequestEvent
- ServletContextEvent
- ServletRequestAttributeEvent
- ServletContextAttributeEvent
- ServletException
- UnavailableException
3 javax.servlet.http包中的接口
javax.servlet.http包中有许多接口。它们如下:
- HttpServletRequest
- HttpServletResponse
- HttpSession
- HttpSessionListener
- HttpSessionAttributeListener
- HttpSessionBindingListener
- HttpSessionActivationListener
- HttpSessionContext(现已弃用)
4 javax.servlet.http包中的类
javax.servlet.http包中有许多类。它们如下:
- HttpServlet
- Cookie
- HttpServletRequestWrapper
- HttpServletResponseWrapper
- HttpSessionEvent
- HttpSessionBindingEvent
- HttpUtils(现已弃用)
热门文章
优秀文章