index.html
<form action="welcome.jsp">
<input type="number" name="x">
<input type="number" name="y">
<input type="number" name="z">
<input type="submit" value="go"><br/>
</form>
welcome.jsp
<%
double x = request.getParameter("x");
double y = request.getParameter("y");
double z = request.getParameter("z");
out.print("max of three entered numbers: " + Math.max(x, Math.max(y, z));
%>
Comments
Leave a comment