Advertisement
Guest User

Untitled

a guest
Dec 10th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.68 KB | None | 0 0
  1. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  2. <%@taglib prefix = "x" uri = "http://java.sun.com/jsp/jstl/xml" %>
  3. <html>
  4. <style>
  5.     body {
  6.         font-family: "Segoe UI";
  7.     }
  8.  
  9.     th, td, tr {
  10.         padding: 1pt 3pt 1pt 3pt;
  11.         text-align: center;
  12.     }
  13.  
  14. </style>
  15. <body>
  16.     <h2>IP</h2>
  17.  
  18.     <c:if test="${not empty lists}">
  19.     <ul>
  20.     <c:out value="<hosts>"/>
  21.  
  22.         <c:forEach var="listValue" items="${lists}">
  23.             <p>
  24.                 <c:out value="<host name=\"${listValue.name}\">
  25.                     <ip>${listValue.ip}</ip>
  26.                 </host>"/>
  27.             </p>
  28.             </c:forEach>
  29.  
  30.         <c:out value="</hosts>"/>
  31.         </ul>
  32.     </c:if>
  33.  
  34.     <h3>Weather forecast:</h3>
  35.  
  36.  
  37.     <c:import var = "xmltext" url="https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22nome%2C%20ak%22)&format=xml&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys"/>
  38.     <x:parse doc = "${xmltext}" var = "output"/>
  39.     <table>
  40.  
  41.         <tr>
  42.             <th><b>Date:</b></th>
  43.             <x:forEach select = "$output//attribute::date" var = "item">
  44.             <th>
  45.                 <x:out select = "$item" />
  46.             </th>
  47.         </x:forEach>
  48.         </tr>
  49.         <tr>
  50.             <th><b>High:</b></th>
  51.             <x:forEach select = "$output//attribute::high" var = "item">
  52.                 <td>
  53.                     <x:out select = "$item" />
  54.                 </td>
  55.             </x:forEach>
  56.         </tr>
  57.         <tr>
  58.             <th><b>Low:</b></th>
  59.             <x:forEach select = "$output//attribute::low" var = "item">
  60.                 <td>
  61.                     <x:out select = "$item" />
  62.                 </td>
  63.             </x:forEach>
  64.         </tr>
  65.         <tr>
  66.             <th><b>Description:</b></th>
  67.             <x:forEach select = "$output//attribute::text" var = "item">
  68.                 <td>
  69.                     <x:out select = "$item" />
  70.                 </td>
  71.             </x:forEach>
  72.         </tr>
  73.     </table>
  74. </body>
  75. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement