Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <%@ taglib prefix="c"
- uri="http://java.sun.com/jsp/jstl/core" %>
- <%@ taglib tagdir="/WEB-INF/tags" prefix="myjsp" %>
- <%@ page import="servlets.Cube,java.io.*,java.util.*"%>
- <%
- Cube cube = (Cube)request.getAttribute("cube");
- Cube obj=new Cube();
- int volume=obj.getVolume();
- %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <body>
- <h2>Cube Info Using JSP 2.0 </h2><br>
- <b>Side of a Cube: ${param.side} </b><br>
- <b>Volume of a Cube: <%=obj.getVolume() %></b><br>
- <br></br><br>
- Using Custom Tag:
- <myjsp:displayform color="red"></myjsp:displayform>
- <br></br><br>
- <h2>Using JSTL:</h2>
- <h2>Cube Info Using JSP 2.0 </h2><br>
- <b>Side of a Cube: ${param.side} </b><br>
- <b>Volume of a Cube: <c:if test="${param.volume}">10><font color="red"></font>the volume is ${volume}</c:if></b><br>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement