(Choose 1 answer)
Given the following deployment descriptor:
<web-app>
<context-param>
<param-name>jdbcDriver</param-name>
<param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value>
</context-param>
<servlet>
<servlet-name>InitParams</servlet-name>
<servlet-class>InitParamsServlet</servlet-class>
</servlet>
</web-app>
What is the outcome of running the following servlet? (Choose one.)
public class InitParamsServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
ServletContext sc = this.getServletContext();PrintWriter out = response.getWriter();
out.write("Initialization Parameter is: " + sc.getInitParameter("jdbcDriver"));
}
}
A. A runtime error
B. "Initialization Parameter is: sun.jdbc.odbc.JdbcOdbcDriver" returned to the requester
C. "Initialization Parameter is: null" returned to the requester
FUOS Mi
Q: 35