You have created a servlet that generates weather maps. The data for these maps is calculated
by a remote host. The IP address of this host is usually stable, but occasionally does have to
change as the corporate network grows and changes. This IP address used to be hard coded, but
after the fifth change to the IP address in two years, you have decided that this value should be
declared in the deployment descriptor so you do NOT have the recompile the web application
every time the IP address changes. Which deployment descriptor snippet accomplishes this goal?
A.
<serlvet-param>
<name>WeatherServlet.hostIP</name>
<value>127.0.4.20</value>
</servlet-param>
B.
<init-param>
<name>WeatherServlet.hostIP</name>
<value>127.0.4.20</value>
</init-param>
C.
<servlet>
<!– servlet definition here –>
<param-name>WeatherServlet.hostIP</param-name>
<param-value>127.0.4.20</param-value>
</servlet>
D.
<init-param>
<param-name>WeatherServlet.hostIP</param-name>
<param-value>127.0.4.20</param-value>
</init-param>
E.
<serlvet-param>
<param-name>WeatherServlet.hostIP</param-name>
<param-value>127.0.4.20</param-value>
</servlet-param>
Explanation: