Area where instances can be stored. By going through the scope, it is possible to share the instance between the Servlet class and the JSP file.
JavaBeans Classes (instances) based on rules that are stored in scope and easy to reuse
getter/setter
Available until response is returned HttpServletRequest
Description
request.setAttribute("Attribute name",instance);
Description
Instance type to be acquired Variable name= (Type of instance to get) request.getAttribute("Attribute name");
Developer sets expiration date for save instance Can be used across requests
Description
HttpSession session = request.getSession();
Description
session.setAttribute("Attribute name",instance);
Description
Instance type to be acquired Variable name= (Type of instance to get) session.getAttribute("Attribute name");
Description
session.removeAttribute("Attribute name");
Description
session.invalidate();
Available until the end of the application High speed access
Description
ServletContext application = this.getServletContext();
Description
appliction.setAttribute("Attribute name",instance);
Description
Instance type to be acquired Variable name= (Type of instance to get) application.getAttribute("Attribute name");
Description
application.removeAttribute("Attribute name");