Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Servlets
« Previous
Next »
How many ServletContext objects are available for an entire web application?
Options
- One each per servlet
- One each per request
- One each per response
- Only one
CORRECT ANSWER : Only one
Discussion Board
ServletContext object
ServletContext object is created using the web container at time of deploying the project. This object can be used to get configuration information from web.xml file. There can only be one ServletContext object per web application. If there is any need to provide the information that is shared to many servlet it is better to provide using the web.xml file with the <context-param> element.
By this way it is easy to maintain all the information that is shared to all the servlet. It is good to make available the information for the servlet. These changes are provided in web.xml file. In case of change in information, there is no need to modify the servlet.
Rohit Sharma 11-30-2014 07:02 AM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲