This relates to the scopes of attributes. As they mention the session, request and context scoped attributes, you might ask "how do I define
servlet scope attribute?".
This information is an answer. There is
no such thing as servlet scope attribute. If you want to achieve something like this, you can define an instance variable in your servlet class. And what does "instance variable" means? Well... it's no
rocket science, as you must have passed the OCPJP ;-)
public class A {
private int i; // THIS is an instance variable
}
More precisely - they mean this:
public class YourServlet extends HttpServlet {
private int i; // THIS is an instance variable
// Rest of the YourServlet details like doGet(...), doPost(...) and bunch of other stuff
}
Cheers!