• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 15 páginas
Examen

PRJ321 || with Complete Solutions.

Document preview thumbnail
Vista previa 2 fuera de 15 páginas

PRJ321 || with Complete Solutions.

Vista previa del contenido

PRJ321 || with Complete Solutions.
b correct answers Consider the following HTML page code:
<html><body>
<a href="/servlet/HelloServlet">POST</a>
</body></html>

Which method of HelloServlet will be invoked when the hyperlink displayed by the above
page is clicked?
Choose one answer.
a. doPost
b. doGet
c. doHref
d. doForm
e. serviceGet

d correct answers Consider the following HTML page code:
<html><body>
<form name="data" action="/servlet/DataServlet" method="POST">
<input type="text" name="name">
<input type="submit" name="submit">
</form>
</body></html>
Identify the TWO methods that can be used to retrieve the value of the name parameter when
the form is submitted.
Choose one answer.
a. getParameters("name");
b. getParameterValue("name");
c. getValue("name");
d. getParameter("name");

c correct answers Which method in the HttpServlet class services the HTTP POST request?
Choose one answer.
a. doPOST(HttpServletRequest, HttpServletResponse)
b. servicePost(HttpServletRequest, HttpServletResponse)
c. doPost(HttpServletRequest, HttpServletResponse)
d. doPost(ServletRequest, ServletResponse)
e. doPOST(ServletRequest, ServletResponse)

c correct answers The HttpServletResponse lets you:
Choose one answer.
a. specify response headers (Content-Type, Set-Cookie, etc.)
b. specify outgoing information such as HTTP status codes (200, 404, etc.)
c. All of the others.
d. obtain a PrintWriter used to send the document content back to the client.

d correct answers The HttpServletRequest has methods by which you can find out about
incoming information such as:
Choose one answer.
a. form data

, b. HTTP request headers
c. the client's hostname
d. All of the others.
e. cookies

d correct answers Which of the following methods can be used to add cookies to a servlet
response?
Choose one answer.
a. ServletResponse.addCookie(String contents)
b. HttpServletResponse.addCookie(String contents)
c. ServletResponse.addHeader(String name, String value)
d. HttpServletResponse.addCookie(Cookie cookie)
e. ServletResponse.addCookie(Cookie cookie)

c correct answers Consider the following declarations:

1.

GET http://cms.fpt.edu.vn/index.jsp HTTP/1.1

Accept: image/*, application/vnd.txt

Accept-Language: en-cd

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)

Host: www.fpt.edu.vn

2.

HTTP/1.0 404 File Not Found

Connection: Close

Date: Sat, 07 Aug 2010 08:30:30 GMT

Content-Type: text/html

Server: J2EE/ 2.0

Which of the following statements is true?

Choose one answer.
a. The first fragment text describes the HTTP Response
b. None of the other choices
c. The first fragment text describes the HTTP Request
d. The second fragment text describes the HTTP Request

d correct answers Consider the following code statement:

Información del documento

Subido en
26 de noviembre de 2025
Número de páginas
15
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$15.79

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
SirAnton
3.7
(118)
Vendido
810
Seguidores
438
Artículos
40068
Última venta
3 días hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes