100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
PRJ301 - FE - Part 1 Complete Answers $9.49   Add to cart

Exam (elaborations)

PRJ301 - FE - Part 1 Complete Answers

 8 views  0 purchase
  • Course
  • PRJ301 - FE - Part 1 Complete Answer
  • Institution
  • PRJ301 - FE - Part 1 Complete Answer

PRJ301 - FE - Part 1 Complete 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? ...

[Show more]

Preview 3 out of 16  pages

  • September 28, 2024
  • 16
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • PRJ301 - FE - Part 1 Complete Answer
  • PRJ301 - FE - Part 1 Complete Answer
avatar-seller
CertifiedGrades
PRJ301 - FE - Part 1 Complete 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 ✔️b



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"); ✔️d

,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



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. ✔️c



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



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) ✔️d



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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller CertifiedGrades. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $9.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75323 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$9.49
  • (0)
  Add to cart