Which of these is a correct fragment within the web-app element of deployment descriptor? Select one correct answer. A. 404 /error.jsp B. /error.jsp mypackage.MyException 404 C. mypackage My Exception 404

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

JAVA WEB

Which of these is a correct fragment within the web-app element of deployment descriptor? Select one correct
answer.
A. <error-page> <error-code>404</error-code> <location>/error.jsp</location> </error-page>
B. <error-page> <exception-type>mypackage.MyException</exception-type>
<location>/error.jsp</location> </error-page>
<error-code>404</error-code>
C. <error-page> <exception-type>mypackage.MyException</exception-type> <error-code>404</error-code>
</error-page>
Transcribed Image Text:Which of these is a correct fragment within the web-app element of deployment descriptor? Select one correct answer. A. <error-page> <error-code>404</error-code> <location>/error.jsp</location> </error-page> B. <error-page> <exception-type>mypackage.MyException</exception-type> <location>/error.jsp</location> </error-page> <error-code>404</error-code> C. <error-page> <exception-type>mypackage.MyException</exception-type> <error-code>404</error-code> </error-page>
Identify the technique that can be used to implement 'sessions' if the client browser does not support
cookies. (Choose one)
A. URL rewriting
B. It cannot be done without cookie support.
C. Using Http headers.
Given the following deployment descriptor:
<web-app>
<context-param>
<param-name>jdbcDriver</param-name>
<param-value>sun.jdbc.odbc.JdbcOdbc Driver</param-value>
</context-param>
<servlet>
<servlet-name>InitParams</servlet-name>
<servlet-class>InitParams Servlet</servlet-class>
</servlet>
</web-app>
What is the outcome of running the following servlet? (Choose one.)
public class InitParams Servlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
ServletContext sc=this.getServletContext();
Print Writer out = response.getWriter();
out.write("Initialization Parameter is: " + sc.getInitParameter("jdbc Driver"));
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
Transcribed Image Text:Identify the technique that can be used to implement 'sessions' if the client browser does not support cookies. (Choose one) A. URL rewriting B. It cannot be done without cookie support. C. Using Http headers. Given the following deployment descriptor: <web-app> <context-param> <param-name>jdbcDriver</param-name> <param-value>sun.jdbc.odbc.JdbcOdbc Driver</param-value> </context-param> <servlet> <servlet-name>InitParams</servlet-name> <servlet-class>InitParams Servlet</servlet-class> </servlet> </web-app> What is the outcome of running the following servlet? (Choose one.) public class InitParams Servlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ServletContext sc=this.getServletContext(); Print Writer out = response.getWriter(); out.write("Initialization Parameter is: " + sc.getInitParameter("jdbc Driver")); 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
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Windows
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education