JSP Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 718 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 PWsi3L
Related Questions
JSP : What are the parameters for service method ?

What are the parameters for service method ?

ServletRequest and ServletResponse
Category: JSP Date: 11/3/2010 1:53:57 PM
JSP : What is URL Encoding and URL Decoding ?

What is URL Encoding and URL Decoding ?

URL encoding is the method of replacing all the spaces and other extra characters into their corresp....
Category: JSP Date: 11/3/2010 12:04:58 PM
JSP : Can we useĀ  ServletOutputStream object from a JSP page?

Can we useĀ  ServletOutputStream object from a JSP page?

No. 
Category: JSP Date: 11/3/2010 11:31:57 AM
JSP : How to refer the "this" variable within a JSP page?

How to refer the "this" variable within a JSP page?

The page implicit object page is equivalent to "this", and returns a reference to the serv....
Category: JSP Date: 11/3/2010 8:37:57 AM
JSP : How do you pass data from a servlet to a JSP?

How do you pass data from a servlet to a JSP?

By forwarding the request to the servlet ( the data must be there in the request scope) or using a s....
Category: JSP Date: 11/3/2010 5:43:57 AM