JSP Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 875 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 EsVgnv
Related Questions
JSP : Can Runnable interface be implemented from within the servlet?

Can Runnable interface be implemented from within the servlet?

Yes
Category: JSP Date: 11/2/2010 10:05:59 PM
JSP : How can you print the stack trace of an exception from a  JSP page?

How can you print the stack trace of an exception from a  JSP page?

By creating an object of PrintWriter we can print the stack trace in JSP page. Eg: PrintWriter pw = ....
Category: JSP Date: 11/2/2010 9:32:59 PM
JSP : Is inter servlet communication important?

Is inter servlet communication important?

Yes, and that because of : 1: Direct servlet manipulation allows to gain access to the other curren....
Category: JSP Date: 11/2/2010 8:26:57 PM
JSP : What is a Java Bean?

What is a Java Bean?

A Java Bean is a software component that has been designed to be reusable in a variety of different ....
Category: JSP Date: 11/2/2010 6:05:58 PM
JSP : How does JSP handle runtime exceptions?

How does JSP handle runtime exceptions?

By using errorPage attribute of page directive JSP handles runtime exceptions and set isErrorPage = ....
Category: JSP Date: 11/2/2010 5:32:57 PM