JSP Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 888 Page Views: 

How can you get a servlet context?



Posted By: Avi Date: 8 November 2010 01:50:57 AM
 Answer:

By calling getServletConfig ().getServletContext (). By calling this.getServletContext () also we will get a ServletContext object.


Posted By: avibtech


Date: 8 November 2010 01:50:57 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image KGrKcM
Related Questions
JSP : What is the difference between Context init parameter and Servlet init parameter?

What is the difference between Context init parameter and Servlet init parameter?

Servlet init parameters are declared inside the <servlet> tag inside Deployment Descriptor and....
Category: JSP Date: 11/9/2010 10:22:57 AM
JSP : What is servlet mapping?

What is servlet mapping?

The servlet mapping is an association between a URL pattern and a servlet and it is used to map requ....
Category: JSP Date: 11/9/2010 9:50:56 AM
JSP : Why is ActionForm a base class rather than an interface?

Why is ActionForm a base class rather than an interface?

The MVC design pattern is very simple to understand but much more difficult to live with. You just n....
Category: JSP Date: 11/9/2010 8:32:59 AM
JSP : What are the scopes available in JSP?

What are the scopes available in JSP?

page, request, session, application
Category: JSP Date: 11/9/2010 6:55:56 AM
JSP : What are the JSP scripting elements?

What are the JSP scripting elements?

There are three scripting language elements: declarations, scriptlets and expressions.
Category: JSP Date: 11/9/2010 6:22:56 AM