Last Updated At 2020-06-15

Attributes in Servlet:s1 class>DemoServlet1 class>s1 /servlet1 s2 class>DemoServlet2 class>s2 /servlet2 Attributes :
- A quality in servlet is a protest that can be set, get or expelled from one of the accompanying extensions request scope
- session scope
- application scope
The servlet software engineer can pass informations starting with one servlet then onto the next utilizing properties. It is much the same as passing item starting with one class then onto the next so we can reuse a similar question over and over.
Methods:
- public void setAttribute(String name,Object object)
- public Object getAttribute(String name)
- public Enumeration getInitParameterNames()
- public void removeAttribute(String name)
JAVA Tutorial Video
[embed]https://www.youtube.com/watch?v=zr1RxswTahU&t=642s [/embed]web.xml:sets the given protest in the application scope.
open Object getAttribute(String name):Returns the trait for the predetermined name.
open Enumeration getInitParameterNames():Returns the names of the setting's introduction parameters as an Enumeration of String objects.
open void removeAttribute(String name):Removes the trait with the given name from the servlet setting.