• +91 9723535972
  • info@interviewmaterial.com

Servlet Interview Questions and Answers

Question - What do you mean by Servlet Context?

Answer -

Servlet Context is basically referred to as an object which has information regarding application and the Web Container. With Servlet context we can log events, get the URL of the specific resource, and can easily store the attributes for other servlets to use.

The core advantage of Servlet is that it is easy to maintain and acts as a mediator between the container and servlet.

There are some important methods of servlet context which are given below:

  • getInitParameter () – return the value of parameter.
  • getInitParameterNames () – returns the name of parameter.
  • void setAttribute () – used to set the values of attributes.
  • void getAttribute () – used to get the values of attributes.
  • void removeAttribute () – used to remove the attribute.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners