The doGet() method in the example extracts values of the parameter’s type and number by using __________
The doGet() method in the example extracts values of the parameter’s type and number by using __________
Right Answer is:
request.getParameter()
SOLUTION
- The doGet() method in the example extracts values of the parameter’s type and number by using request.getParameter().
- The servlet is called PersonQueryServlet, while the form specifies that “action=”PersonQuery”.”
- The Web server must be told that this servlet is to be used to handle requests for PersonQuery.
- The form specifies that the HTTP get mechanism is used for transmitting parameters.
- So the doGet() method of the servlet, as defined in the code, is invoked.
- It uses these values to run a query against a database.
- The code used to access the database and to get attribute values from the query result is not shown.