Skip to Main Content

Developer Community

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

url mapping

SETH YOMBAFeb 25 2025 — edited Feb 25 2025

!DOCTYPE html>
<!--

-->
<html>
<head>
<title>Multiply numbers page</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>
<h1>Multiply numbers</h1>
<p>
Please enter two numbers below.
</p>
<form action="multiply_numbers_outcome.jsp" method="POST">
<table>
<tr>
<td>First number: </td>
<td><input type="text" name="num1" required=""/></td>
</tr>
<tr>
<td>second number: </td>
<td><input type="text" name="num2" required=""/></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="MULTIPLY"/></td>
</tr>
</table>
</form>
</div>
</body>
</html>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Multiply numbers outcome Page</title>
</head>
<body>
<h1>Multiply numbers outcome</h1>
<%
int num1,num2,product;
num1 = Integer.parseInt(request.getParameter("num1"));
num2 = Integer.parseInt(request.getParameter("num2"));
product = num1 * num2;
%>
<p>
The product of <b><%=num1%></b> and <b><%=num2%></b> is <b><%=product%></b>.
</p>
<p>
Click<a href="arithmetic_options.html">here</a> to go back to the arithmetic options page.
Click <a href="index.html">here</a> to go to the home page.
</p>
</body>
</html>

in case i want to do a web-based multiplication operation,on the multiplication part when i enter the numbers to multiply the jsp outcome displays the sum of the two numbers instead of their multiplications.

NB: i used the glassfish server to deploy this arithmeticwebapp

Comments

Processing

Post Details

Added on Feb 25 2025
0 comments
93 views