Forums Register Login

Doubt about mock exam question

+Pie Number of slices to send: Send
I was studying from javabeat mock exam and got confused by a question.

17) Assuming the following content within the definition of web.xml,
<init-param>
<param-name>MovieName</param-name>
<param-value>Lord of the Rings</param-value>
</init-param>

which of the following can be used to retrive the value of the parameter
'MovieName'?

a. ServletContext.getParameter(�)
b. GenericServlet.getInitParameter(�)
c. Servlet.getInitParameter(�)
d. ServletConfig.getInitParameter()

The answer given is b but i think the answer should be d.

can anyone tell me whether i am right or wrong??
+Pie Number of slices to send: Send
b is right, check the api docs
d is missing the dots within ()
+Pie Number of slices to send: Send
"Prince Jain",
Please check your private messages regarding an important administrative matter.
-Ben
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 597 times.
Similar Threads
Which statement is true regarding initialization parameter
initialization parameters and error-page related
Help on ELEMENT
Query from mock exam
applicationScope in EL
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:28:38.