Java 7 A Comprehensive Tutorial (Pg 620 628).pdf


Preview of PDF document java-7-a-comprehensive-tutorial-pg-620-628.pdf

Page 1 2 3 4 5 6 7 8 9

Text preview


Copyright © 2014. Brainy Software. All rights reserved.

Chapter 26: Java Web Applications

writer.println("<tr>");
writer.println("<td>Address:</td>");
writer.println("<td>" + request.getParameter("address")
+ "</td>");
writer.println("</tr>");
writer.println("<tr>");
writer.println("<td>Country:</td>");
writer.println("<td>" + request.getParameter("country")
+ "</td>");
writer.println("</tr>");
writer.println("<tr>");
writer.println("<td>Shipping Instructions:</td>");
writer.println("<td>");
String[] instructions = request
.getParameterValues("instruction");
if (instructions != null) {
for (String instruction : instructions) {
writer.println(instruction + "<br/>");
}
}
writer.println("</td>");
writer.println("</tr>");
writer.println("<tr>");
writer.println("<td>Delivery Method:</td>");
writer.println("<td>"
+ request.getParameter("deliveryMethod")
+ "</td>");
writer.println("</tr>");
writer.println("<tr>");
writer.println("<td>Catalog Request:</td>");
writer.println("<td>");
if (request.getParameter("catalogRequest") == null) {
writer.println("No");
} else {
writer.println("Yes");
}
writer.println("</td>");
writer.println("</tr>");
writer.println("</table>");
writer.println("<div style='border:1px solid #ddd;" +
"margin-top:40px;font-size:90%'>");
writer.println("Debug Info<br/>");
Enumeration<String> parameterNames = request
.getParameterNames();

Kurniawan, Budi. Java 7 : A Comprehensive Tutorial, Brainy Software, 2014. ProQuest Ebook Central,
http://ebookcentral.proquest.com/lib/valencia-ebooks/detail.action?docID=3003885.
Created from valencia-ebooks on 2018-04-23 08:26:32.

611