Java
T
point
Home
Python
Java
JavaScript
HTML
SQL
PHP
C#
C++
DS
Aptitude
Reasoning
Selenium
DBMS
C
Android
Interview Q
Content Menu ▼
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Question 1
:
Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet
and a web application deployment descriptor that contains:
<context-param> <param-name>foo</param-name>
<param-value>frodo</param-value></context-param>
Which one are true?
1.
The foo initialization parameter CANNOT be set programmatically.
2.
Compilation fails because getInitParameter returns type Object.
3.
Compilation fails because ServletContext does NOT have a getInitParameter
method.
4.
The foo parameter must be defined within the <servlet> element of the
deployment descriptor.