JSP Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 756 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 mwH92c
Related Questions
JSP : Can destroy() method be called on servlets from service method ?
JSP : What is a WAR file?

What is a WAR file?

WAR(Web Archive) is a compressed version of web application and used to deploy the web application.
Category: JSP Date: 11/5/2010 3:41:59 PM
JSP : What is servlet context ?

What is servlet context ?

The servlet context is an object contains a information about the Web application and container, it ....
Category: JSP Date: 11/5/2010 1:30:56 PM
JSP : What is the difference between <%@ include ...> and <jsp:include> ?

What is the difference between <%@ include ...> and ?

“@ include” is static include; where the contents of the file will get included on Translation phase....
Category: JSP Date: 11/5/2010 11:09:56 AM
JSP : How HTTP Servlet handles client requests?  

How HTTP Servlet handles client requests?  

By using its service method that supports standard HTTP client requests by dispatching each request ....
Category: JSP Date: 11/5/2010 8:46:58 AM