Home
›
Servlet Architecture
Posted by: InstanceOfJava
Posted date:
Dec 6, 2014
/
- Servlets read the explicit data sent by the clients (browsers). This
includes an HTML form on a Web page or it could also come from an applet
or a custom HTTP client program.
- Read the implicit HTTP request data sent by the clients
(browsers). This includes cookies, media types and compression schemes
the browser understands, and so forth.
- Process the data and generate the results. This process may
require talking to a database, executing an RMI or CORBA call, invoking a
Web service, or computing the response directly.
- Send the explicit data (i.e., the document) to the clients
(browsers). This document can be sent in a variety of formats, including
text (HTML or XML), binary (GIF images), Excel, etc.
- Send the implicit HTTP response to the clients (browsers). This
includes telling the browsers or other clients what type of document is
being returned (e.g., HTML), setting cookies and caching parameters, and
other such tasks.
Servlet API:
- Servelt API contains three packages
- javax.servlet: Package contains a number of classes and interfaces that describe the contract
between a servlet class and the runtime environment provided for an instance of such a class a
conforming servelt container.
- javax.servlet.aanotation: Package contains a number of annotations that allow users to use
annotations to declare servlets , filters, listeners and specify the metadata for the declared component
- javax.servlet.http: Package contains a number of classes and interfaces that describe and define the contract between a servlet class rnning under the HTTP protocal and the runtime environment provided for an instance of such class by a confirming servlet container.
Interfaces present in javax.servlet:
- AsyncContext
- AsyncListener
- Filter
- FilterChain
- FilterConfig
- RequestDispatcher
- Servlet
- ServletConfig
- ServletContext
- ServletContextAttributeListener
- ServletContextListener
- ServletRequest
- ServletRequestAttributeListener
- ServletRequestListener
- ServletResponse
- SingleThreadModel
Classes present in javax.servlet:
- AsyncEvent
- ServletInputStream
- ServletOutputStream
- GenericServlet
- ServletContextEvent
- ServletContextAttributeEvent
- ServletRequestAttributeEvent
- ServeltRequestEvent
- ServletRequestWrapper
- ServeletResponseWrapper
- SessionCookieConfig
Exceptions:
- ServletException
- UnavilableException
Interfaces present in javax.servlet.http:
- HttpServletRequest
- HttpServletResponse
- HttpSession
- HttpSessionBindingListener
- HttpSessionContext
- HttpSessionListener
- HttpSessionActivationListener
- HttpSessionAttributeListener
Classes present in javax.servlet.http:
- Cookie
- HttpServlet
- HttpServletRequestWrapper
- HttpServletResponseWrapper
- HttpSessionBindingEvent
- HttpSessionEvent
- HttpUtils
Annotation types declared in javax.servlet.annotation package
- InitParam
- ServletFilter
- WebServlet
- WebservletContextListener
Please provide Spring and Hibernate also.
ReplyDelete