index.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body>
	JSP첫째날 <a href="day01.jsp">day01.jsp</a><br/>
	JSP첫째날 <a href="day01_02.jsp">day0_02.jsp</a>
</body>
</html>


day01_02.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body>
	1부터 10까지의 합을 더해서 화면에 출력하자
	<% int sum=0;
		
		for(int i=1;i<=10;i++){
			sum +=i;
		}
	%>
	1~10까지의 합은 : ~~~<%=sum %>다
	
</body>
</html>




+ Recent posts