JSP Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 634 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 rSlXtj
Related Questions
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
JSP : Why doesn't the focus feature on the <html:form> tag work in every circumstance?

Why doesn't the focus feature on the tag work in every circumstance?

Because there is some disagreement between the various browsers, and different versions of the same ....
Category: JSP Date: 11/8/2010 11:50:00 PM
JSP : How will you communicate from an applet to servlet?

How will you communicate from an applet to servlet?

There are three ways to communicate from an applet to servlet and they are: HTTP Communication (Text....
Category: JSP Date: 11/8/2010 11:17:58 PM
JSP : What is the using of “super.init (config)” in servlets ?

What is the using of “super.init (config)” in servlets ?

To access the ServletConfig from the servlet.
Category: JSP Date: 11/8/2010 10:12:56 PM
 
Find Best Deals @