JSP Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 935 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 CW0obZ
Related Questions
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
JSP : What is client side refresh?

What is client side refresh?

It is the standard HTTP protocols ways of refreshing the page, and is supported by all browsers. <....
Category: JSP Date: 11/9/2010 4:33:57 AM
JSP : What is the differecnce between JspWriter and PrintWriter?

What is the differecnce between JspWriter and PrintWriter?

JspWriter is buffered but PrintWriter is not.
Category: JSP Date: 11/9/2010 2:11:59 AM
JSP : How can I invoke a JSP error page from a servlet?

How can I invoke a JSP error page from a servlet?

By creating a request dispatcher for the JSP error page, and pass the exception object as a javax.se....
Category: JSP Date: 11/9/2010 1:39:57 AM