<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="Calc_02.jsp" method="get">
첫번째 수 :<input type="text" name="num1"><br/>
두번째 수 :<input type="text" name="num2"><br/>
<input type="submit" value="입력">
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
int num1= Integer.parseInt(request.getParameter("num1"));
int num2= Integer.parseInt(request.getParameter("num2"));
int sum=num1+num2;
%>
첫번째 수:<%=num1 %><br/>
두번째 수:<%=num2 %><br/>
<%=num1 %>+<%=num2 %>=<%=sum %>
<form action="Calc_03.jsp">
<input type="submit" value="곱셉">
<input style="visibility:hidden;" name="num1" value=<%= num1%>>
<input style="visibility:hidden;" name="num2" value=<%= num2%>>
</form>
<%--
<form action="http://192.168.0.113:8080/JSP/Calc_03.jsp">
<%=num1 %> - <%=num2 %> = <%=(num1-num2) %> <input type="submit" value="곱셈">
<input style="visibility:hidden;" name="num1" value=<%= num1%>>
<input style="visibility:hidden;" name="num2" value=<%= num2%>>
</form> --%>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
int num1= Integer.parseInt(request.getParameter("num1"));
int num2= Integer.parseInt(request.getParameter("num2"));
int mul=num1*num2;
%>
첫번째 수:<%=num1 %><br/>
두번째 수:<%=num2 %><br/>
<%=num1 %>X<%=num2 %>=<%=mul %>
<form action="http://192.168.0.164:8080/Date_031_20191129_003_JSP_01/Team.jsp" method="get">
<input type="submit" value="나눗셈">
<input style="visibility:hidden;" name="num1" value=<%= num1%>>
<input style="visibility:hidden;" name="num2" value=<%= num2%>>
</form>
</body>
</html>