Servlet-JSP
Updated:
Web Server
Web Server = Web Application Server(WAS) = Servelt Engine = Container
Web project = (web) context
Http
Servlet
It is considered to be a process inside the server.
- HttpServlet
- Parent class
- Support for http communication
- HttpServletRequest
- The object that holds the information requested by the client
- API
- String getParameter()
- String[] getParameterValues()
- setCharacterEncoding()
- HttpServletResponse
- Object responding to requested client
- API
- setContentType(“mimetype;charset=utf-8”)
- PrintWriter gerWriter()
- sendRedirect()
- Cookie
- Store the values that the client system keeps in state
- new Cookie(key, value)
- setMaxAge()
- addCookie()
- Cookie[] c = request.getCookies()
- getName(“name”)
- getValue()
- HttpSession
- Store the values that the server system keeps in state
- API
- HttpSession s = request.getSession()
- s.setAttribute(key, value)
- s.getAttribute(key)
- s.removeAttribute(key)
- s.invalidate()
- ServletContext
- Unique objects, one for each project deployed on the server
- Store in ServletContext to provide resources shared by all customers using web projects
Technology for preventing DB system from down
- Adjust the number of connections
- Create Connection Objects and Keep them Standby
- If the maximum number of connectors are created and disconnected, only the connections are returned to separate memory stored, not deleted
- Separate between web application server and db server