JSP Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 671 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 rJgRTW
Related Questions
JSP : What are the use of setMaxAge() and getMaxAge() in Cookies?

What are the use of setMaxAge() and getMaxAge() in Cookies?

setMaxAge : Sets the maximum age of the cookie. The cookie will expire after that many seconds have ....
Category: JSP Date: 11/7/2010 11:29:58 PM
JSP : What is the difference between an applet and a servlet?

What is the difference between an applet and a servlet?

Applets run inside web browsers and must have graphical user interfaces. Servlets run inside a web s....
Category: JSP Date: 11/7/2010 10:56:58 PM
JSP : What is the Servlet Interface?

What is the Servlet Interface?

It is the central abstraction in the Servlet API that All servlets implement it, and that is directl....
Category: JSP Date: 11/7/2010 10:23:56 PM
JSP : How can static files be included within a JSP page?

How can static files be included within a JSP page?

Static resources can be included using the JSP include directive and that is just once during the tr....
Category: JSP Date: 11/7/2010 9:50:56 PM
JSP : How will you pass information from JSP to included JSP?

How will you pass information from JSP to included JSP?

By using <%jsp:param> tag.
Category: JSP Date: 11/7/2010 5:07:57 PM