SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2. <%= request.getAttribute("doctype") %>
  3.  
  4. <html>
  5.     <head>
  6.         <title>Interesting Picture</title>
  7.     </head>
  8.     <body>
  9.         <% if (request.getAttribute("pictureURL") != null) { %>
  10.         <h1>Here is an interesting picture of a <%= request.getParameter("searchWord")%></h1><br>
  11.         <% if(request.getParameter("searchWord").equalsIgnoreCase("Andy")) { %>
  12.         <% for (int i=0; i<10;i++){ %>
  13.         <img src="<%= "http://www.andrew.cmu.edu/course/95-702/Images/AndrewCarnegie.jpg" %>"><br><br>
  14.         <% } %>
  15.         <% } else { %>
  16.         <img src="<%= request.getAttribute("pictureURL")%>"><br><br>
  17.         <% } %>
  18.         <% } else { %>
  19.         <h1>An interesting picture of a <%= request.getParameter("searchWord")%> could not be found</h1><br>
  20.         <% } %>
  21.          <form action="getAnInterestingPicture" method="GET">
  22.             <label for="letter">Type another word.</label>
  23.             <input type="text" name="searchWord" value="" /><br>
  24.             <input type="submit" value="Submit" />
  25.         </form>
  26.     </body>
  27. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top