Since:
- HttpServlet extends GenericServlet
- GenericServlet implements Servlet, ServletConfig, java.io.Serializable
So I could call:
Code: Select all
getServletContext().getInitParameter(java.lang.String name)
Moderator: admin
Code: Select all
getServletContext().getInitParameter(java.lang.String name)
Yeah, I understood that... But I am saying that there are 3(2nd, 3rd and 4th) answers correct, however the test considers correct only the following 2:admin wrote:You want to get the servlet initialization parameter, not the context initialization parameter.
HTH,
Paul.
Code: Select all
getServletConfig().getInitParameter("dbname");
Code: Select all
getInitParameter("dbname");
Code: Select all
getServletContext().getInitParameter("dbname");
Users browsing this forum: No registered users and 63 guests