1.

What Are The Different Ways For Getting A Servlet Context?

Answer»

We will get ServletContext by calling getServletConfig ().getServletContext (). This is because a ServletConfig ALWAYS HOLD a REFERENCE to ServletContext. By calling this.getServletContext () also we will get a ServletContext OBJECT.

We will get ServletContext by calling getServletConfig ().getServletContext (). This is because a ServletConfig always hold a reference to ServletContext. By calling this.getServletContext () also we will get a ServletContext object.



Discussion

No Comment Found