Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  2. pageEncoding="ISO-8859-1"%>
  3. <%@ taglib prefix="c"
  4. uri="http://java.sun.com/jsp/jstl/core" %>
  5.  
  6. <%@ taglib tagdir="/WEB-INF/tags" prefix="myjsp" %>
  7. <%@ page import="servlets.Cube,java.io.*,java.util.*"%>
  8. <%
  9. Cube cube = (Cube)request.getAttribute("cube");
  10. Cube obj=new Cube();
  11.  
  12. int volume=obj.getVolume();
  13. %>
  14. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  18.  
  19. <body>
  20.  
  21. <h2>Cube Info Using JSP 2.0 </h2><br>
  22. <b>Side of a Cube: ${param.side} </b><br>
  23. <b>Volume of a Cube: <%=obj.getVolume() %></b><br>
  24.  
  25. <br></br><br>
  26. Using Custom Tag:
  27. <myjsp:displayform color="red"></myjsp:displayform>
  28.  
  29.  
  30. <br></br><br>
  31. <h2>Using JSTL:</h2>
  32. <h2>Cube Info Using JSP 2.0 </h2><br>
  33. <b>Side of a Cube: ${param.side} </b><br>
  34. <b>Volume of a Cube: <c:if test="${param.volume}">10><font color="red"></font>the volume is ${volume}</c:if></b><br>
  35.  
  36. </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement