Mega Code Archive
Do Calculation on Value Saved in PageContext
<%--
Copyright (c) 2002 by Phil Hanna
All rights reserved.
You may study, use, modify, and distribute this
software for any purpose provided that this
copyright notice appears in all copies.
This software is provided without warranty
either expressed or implied.
--%>
<%
pageContext.setAttribute("a", new Integer(10));
pageContext.setAttribute("b", new Integer(3));
%>
a = ${a}, b = ${b}:
a + b = | ${a + b} |
a - b = | ${a - b} |
a * b = | ${a * b} |
a / b = | ${a / b} |
a % b = | ${a % b} |
a mod b = | ${a mod b} |