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>
<%@ 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>
'JSP > 2012.04강의(MySQL)' 카테고리의 다른 글
1일차 request 기본 객체 (0) | 2012.05.21 |
---|---|
1일차 표현식,선언부 (0) | 2012.05.21 |
1일차 날짜 및 이미지(putty 설정~~) (0) | 2012.05.21 |
1일차 TomCat 설치 및 eclipse 연동 ,cafe24 가입하는법 (0) | 2012.05.21 |
1일차 JSP 책소개 (0) | 2012.05.21 |