OpenFrameWork

오픈프레임워크_Day54

px 2015. 6. 1. 08:55
### : 목차 구분 기호
--- : 목차 내에 항목 구분 기호
@@@ : 태그 용도 
,,, : 같은 항목 내에 구분 기호

목차
1. 이론 및 정보
2. 설정 및 그 밖에
3. 소스코드 또는 실습
4. 과제

###################################
1. 이론 및 정보
-----------------------------------
*. 오류페이지 이동 방법
1. 오류페이지 마다 일일이 지정하는 방법

2. web.xml 등록하는 방법
     2.1 모두 다 적용되는 오류페이지
          <error-page>
               <exception-type>발생가능한 예외객체</exception-type>
               <location>이동할 페이지</location>
          </error-page>
     2.2 HTTP 상태코드에 대해 선언
          <error-page>
               <error-code>에러 코드(404,500,...)</error-code>
               <location>이동할 페이지</location>
          </error-page>
-----------------------------------
* 다국어 기능
/WEB-INF/classes 폴더는 classpath가 걸려있음
1. class path 경로에 번역 파일을 만들어라
2. 파일 확장자는 properties 로 하라



이전에는 번역을 위해서 매번 똑같은 페이지를 복사해서 번역된 페이지를 만들었으나

이는 유지보수에 매우 힘들다, 또한 언어가 추가될 때마다 새로운 사이틀 만드는 것과 같은
낭비가 이루어지기 때문에 좋지 못한 방식이다. 

이를 쉽게 하기 위해서 한글,영문,... 각각의 번역된 파일들로 따로 보관해 놓고
웹사이트에서 가져다 쓸 수 있게 만들 예정
----------------------------------- 
* JDK Utility
~\Java\jdk1.8.0_40\bin\native2ascii.exe
원어를 아스키 코드로 바꿔주는 프로그램
----------------------------------- 
* JQuery
1. 특징
(1) 자바스크립트로 만들어진 라이브러리(확장자 .js)
(2) 가볍고 빠르다.
(3) 웹 표준화(크로스 브라우징 - 모든 브라우저에서 동작하도록)
(4) 막강한 CSS Selector 기능 ( body{~} 에서 body 자리에 오는 것들 )
(5) 메서드 체인 지원
     객체.메서드()
     객체.메서드()
     객체.메서드()
     객체.메서드()
     ...

     이 아니라 
     메서드().메서드().메서드()..... 
     이런식으로 메서드를 사용
(6) AJAX를 지원(기존에는 자바스크립트만 지원)
(7) 풍부한 플러그인 지원
(8) 모바일을 전문적으로 지원

2. 참고 사이트
(1) jquery.com
(2) jqueryui.com
(3) w3schools.com
...

3. 이 외의 라이브러리
(1) prototype
(2) dojo
(3) mootools
(4) yui
(5) node.js
(6) angular.js
...

4. 문법
(1) JQuery Selector
          1) HTML DOM을 마음대로 트래버스(traverse) 가능(어디든 탐색 가능)
          2) CSS Selector를 사용하여 원하는 객체 탐색

          div p{font-color:red;}
          HTML의 div 자식의 p 태그에 대해서 {} 안에 내용의 스타일을 지정
          div 띄고 p는 div의 자식을 접근 할때 사용

          #loginID{font-weight:bold;}
          HTML 태그 중에 id가 'loginID' 인 태그를 모두 {} 안에 내용으로 스타일 지정

          .Columns{paddin;10px} 
          HTML 태그 중에 모든 요소 중에 class 속성이 'Columns'라는 태그들을 모두 {}안에 내용으로 스타일 지정

          jQuery(div p).디자인 프로퍼티 , $(div p).디자인 프로퍼티
          jQuery(#loginID).디자인 프로퍼티 , $(#loginID).디자인 프로퍼티
          jQuery(.Columns).디자인 프로퍼티 , $(.Columns).디자인 프로퍼티

          jQuery에 추가된 요소
          
          필터링
          p>a : p 요소 바로 아래 자식인 a요소
          div+p : div 요소의 바로 다음에 나오는 형제 p요소와 일치
          div~p : div 요소에 다음에 나오는 모든 형제 p요소와 일치

* CDN 방식도 지원(홈페이지 다운로드 가면 설명 있음)
-----------------------------------  
###################################
2. 설정 및 그 밖에
-----------------------------------
* 수정
/JSTLApp/WebContent/WEB-INF/web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>JSTLApp</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
 
  <servlet>
     <servlet-name>foreach.do</servlet-name>
     <servlet-class>myservlet.ForeachServlet</servlet-class>
  </servlet> 
  <servlet-mapping>
     <servlet-name>foreach.do</servlet-name>
     <url-pattern>/foreach.do</url-pattern>
  </servlet-mapping>
 
  <servlet>
     <servlet-name>memUpdate.do</servlet-name>
     <servlet-class>myservlet.MemberServlet</servlet-class>
  </servlet> 
  <servlet-mapping>
     <servlet-name>memUpdate.do</servlet-name>
     <url-pattern>/memUpdate.do</url-pattern>
  </servlet-mapping>
 
  <servlet>
     <servlet-name>choose.do</servlet-name>
     <servlet-class>myservlet.ChooseServlet</servlet-class>
  </servlet> 
  <servlet-mapping>
     <servlet-name>choose.do</servlet-name>
     <url-pattern>/choose.do</url-pattern>
  </servlet-mapping>
 
  <error-page>
     <error-code>404</error-code>
     <location>/exc/notFound.jsp</location>
  </error-page>
 
  <error-page>
     <exception-type>java.lang.Throwable</exception-type>
     <location>/exc/exceptionTest.jsp</location>
  </error-page>

</web-app>
----------------------------------- 
* classes 폴더 생성 및 다국어를 위한 파일 만들기
/JSTLApp/WebContent/WEB-INF/classes

다국어 폴더 만들때 "General - "Untitled Text File" 또는 "File" 이용


----------------------------------- 

native2ascii.exe를 이용한 intro_ko 인코딩
~\JSP\EclipseWork\JSTLApp\WebContent\WEB-INF\classes>native2ascii intro_ko.txt intro_ko.properties
원본을 수정해서 인코딩한 파일을 서버에서 사용하면 됨
----------------------------------- 
* 프로젝트 새로 만듬 - JQueryApp

라이브러리 복사
/JQueryApp/WebContent/WEB-INF/lib/servlet-api.jar

JQuery 라이브러리 다운
jquery.com/download/
Download the compressed, production jQuery 2.1.4
Download the uncompressed, development jQuery 2.1.4
둘 중에 하나 받아서 사용하면 됨

/JQueryApp/WebContent/js/jquery-2.1.4.js
----------------------------------- 
###################################
3. 소스코드 또는 실습 
-----------------------------------
3-1
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/core06.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<h2>&lt;c:forTokens/&gt;</h2>
<c:forTokens items="하나/둘/셋/넷/다섯" delims="/" var="token">
     ${token}<br/>
</c:forTokens>
<hr/>
<c:forTokens items="딸기*키위/체리-포도*참외" delims="*/-" var="token">
     ${token}<br/>
</c:forTokens>
<hr/>
사자의 생일에는 누가 왔을까?<br/>
<c:set var="guests" value="토끼~~거북이^^사슴"/>
<c:forTokens items="${guests}" delims="~~^^" var="token">
     ${token}<br/>
</c:forTokens>
</body>
</html>
-----------------------------------  
3-2
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/core07.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<h2>&lt;c:catch => Exception&gt;</h2>
<%-- 에러 메세지 보여지면 안되는 이유 1사용자의 신뢰도 떨어뜨림 2서버 코드가 노출 되어서 보안상의 문제 --%>
<c:set var="test1" value="${3/0}"/>
<%try{%>
<%=3/0%>
<%}catch(Exception e){}%>
<br/><br/>
<c:catch>
<%=3/0%>
</c:catch>

<%-- 에러 피하기위한 목적이 아니라 디버깅 목적이라면 --%>
<%try{%>
<%=3/0%>
<%}catch(Exception e){
     out.println("오류 : "+e);
}%>
<br/><br/>

<%-- 에러에 대한 정보가 var에 저장이 됨 --%>
<c:catch var="err">
<%=3/0%>
</c:catch>
<c:if test="${err!=null}">
     오류 클래스+내용 : ${err}<br/>
     오류 내용 : ${err.message}<br/>
</c:if>

<%--
<%=10/0%>
--%>

<%-- 404에러시 특정 페이지로 이동하게 만들기 --%>
<a href="abc.jsp">페이지 이동</a>

</body>
</html>
-----------------------------------  
3-3
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/exc/exceptionTest.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<!DOCTYPE html >
<html><head><title>Insert title here</title></head>
<body>execptionTest입니다.</body></html>
----------------------------------- 
3-4
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/exc/notFound.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<!DOCTYPE html >
<html><head><title>Insert title here</title></head>
<body><h2>페이지를 찾을 수 없습니다.</h2></body></html>
----------------------------------- 
3-5
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/core08.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<%-- /JSTLApp/WebContent/core08_proc.jsp 로 이동 하겠슴 --%>
<h2>&lt;페이지 이동&gt;</h2>
<h2>여기는 core08.jsp 입니다.</h2>
<c:redirect url="core08_proc.jsp">
     <c:param name="num1" value="5"/>
     <c:param name="num2" value="10"/>
</c:redirect>
</body>
</html>
----------------------------------- 
3-6
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/core08_proc.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<h1>&lt;페이지 이동&gt;</h1>
<h2>core08_proc.jsp 입니다.</h2>
넘어온 값 : ${param.num1}, ${param.num2}<br/>
두 수를 더한 값 : ${param.num1 + param.num2}<br/>
</body>
</html>
----------------------------------- 
3-7 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/inc/sub.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<%request.setCharacterEncoding("euc-kr");%>
여기는 sub.jsp입니다.<br/>
이름 : ${param.irum}<br/>
나이 : ${param.age}<br/> 
-----------------------------------  
3-8 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/core09.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<h1>여기는 core09.jsp 입니다.</h1>
여기는 sub.jsp가 보여질 공간입니다.<br/>
<div style="width: 200px;height: 100px;background-color: #660066">
     <c:import url="/inc/sub.jsp">
          <c:param name="irum" value="홍길동"/>
          <c:param name="age" value="30세"/>
     </c:import>

<br/><br/><br/>
<c:import url="http://www.w3schools.com"/>
</body>
</html>
-----------------------------------  
3-9 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/core10.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<h1>여기는 core10.jsp 입니다.</h1>
<%-- 이동 기술은 없음 위치를 지정을 해준다 --%>
<c:url value="core08_proc.jsp" var="next">
     <c:param name="num1" value="100"/>
     <c:param name="num2" value="200"/>
</c:url>
....<br/>
....<br/>
<c:redirect url="${next}"></c:redirect>
</body>
</html>
-----------------------------------  
3-10 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/fmt01.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<fmt:formatNumber value="10000000"/><br/>
<fmt:formatNumber value="10000000" groupingUsed="true"/><br/>
<fmt:formatNumber value="10000000" groupingUsed="false"/><br/>

<fmt:formatNumber value="6.234543" pattern="#.###"/><br/>
<fmt:formatNumber value="10.5" pattern="#.00"/><br/>

<fmt:formatNumber value="0.5" type="percent"/><br/>
<fmt:formatNumber value="10000000" type="currency"/><br/>
<fmt:formatNumber value="10000000" type="currency" currencySymbol="$"/><br/>
</body>
</html>
-----------------------------------  
3-11 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/fmt02.jsp

<%@page import="java.util.Date"%>
<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
예전
<%=new Date()%><br/><br/>

요즘
<c:set var="date" value="<%=new Date()%>"/><br/>
<fmt:formatDate value="${date}"/><br/>
<fmt:formatDate value="${date}" type="time"/><br/>
<fmt:formatDate value="${date}" type="date"/><br/>
<fmt:formatDate value="${date}" type="both"/><br/>

<hr/>

<fmt:formatDate value="${date}" dateStyle="full"/><br/>
<fmt:formatDate value="${date}" dateStyle="long"/><br/>
<fmt:formatDate value="${date}" dateStyle="medium"/><br/>
<fmt:formatDate value="${date}" dateStyle="short"/><br/>


<fmt:formatDate value="${date}" type="time" timeStyle="full"/><br/>
<fmt:formatDate value="${date}" type="time" timeStyle="long"/><br/>
<fmt:formatDate value="${date}" type="time" timeStyle="medium"/><br/>
<fmt:formatDate value="${date}" type="time" timeStyle="short"/><br/>
<hr/>
<%-- 날짜는 medium으로 시간을 long으로 출력 --%>
<fmt:formatDate value="${date}" type="both" timeStyle="long" dateStyle="medium"/><br/>
<hr/>
<%-- 원하는 모양 지정 --%>
<fmt:formatDate value="${date}" type="date" pattern="yyyy/MM/dd(E)"/><br/>
<fmt:formatDate value="${date}" type="time" pattern="(a)hh:mm:ss"/>
</body>
</html>
-----------------------------------  
3-12 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/fmt03.jsp

<%@page import="java.util.Date"%>
<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<c:set var="date" value="<%=new Date()%>"/>
<fmt:setLocale value="ko_kr"/>
금액 : <fmt:formatNumber value="100000000" type="currency"/><br/>
날짜 : <fmt:formatDate value="${date}" type="both" dateStyle="full" timeStyle="full"/><br/>
<hr/>
<fmt:setLocale value="en_us"/>
금액 : <fmt:formatNumber value="100000000" type="currency"/><br/>
날짜 : <fmt:formatDate value="${date}" type="both" dateStyle="full" timeStyle="full"/><br/>
<hr/>
<fmt:setLocale value="ja_jp"/>
금액 : <fmt:formatNumber value="100000000" type="currency"/><br/>
날짜 : <fmt:formatDate value="${date}" type="both" dateStyle="full" timeStyle="full"/><br/>
<hr/>
<fmt:setLocale value="zh_ch"/>
금액 : <fmt:formatNumber value="100000000" type="currency"/><br/>
날짜 : <fmt:formatDate value="${date}" type="both" dateStyle="full" timeStyle="full"/><br/>
<hr/>
<fmt:setLocale value="ru_ru"/>
금액 : <fmt:formatNumber value="100000000" type="currency"/><br/>
날짜 : <fmt:formatDate value="${date}" type="both" dateStyle="full" timeStyle="full"/><br/>
</body>
</html>
-----------------------------------  
3-13 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/fmt04.jsp

<%@page import="java.util.Date"%>
<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html >
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<c:set var="date" value="<%=new Date()%>"/>
서울 : <fmt:formatDate value="${date}" type="both" /><br/><br/>
<fmt:timeZone value="Asia/Hong_Kong">
홍콩 type1 : <fmt:formatDate value="${date}" type="both" /><br/><br/>
</fmt:timeZone>
홍콩 type2 : <fmt:formatDate value="${date}" type="both" timeZone="Asia/Hong_Kong"/><br/><br/>
런던 : <fmt:formatDate value="${date}" type="both" timeZone="Euroup/London"/><br/><br/>
<fmt:setTimeZone value="America/New_York"/>
뉴욕 type1 : <fmt:formatDate value="${date}" type="both" timeZone="Euroup/London"/><br/><br/>
뉴욕 type2 : <fmt:formatDate value="${date}" type="both" timeZone="America/New_York"/><br/><br/>
</body>
</html>
-----------------------------------  
3-14 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/WEB-INF/classes/intro_en.properties

# intro_en.properties

TITLE=about us
GREETING=Hi!~~ Thank you for visiting this site.
BODY=We are dedicated software development company.
COMPANY_NAME=Duke Software Inc.
-----------------------------------  
3-15 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/fmt05.jsp

<%@page import="java.util.Date"%>
<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html >
<%--
<fmt:setLocale value="en"/>
--%>
<fmt:setLocale value="ko"/>
<fmt:setBundle basename="intro"/>
<html>
<head>
<title>
<%-- 제목 --%>
<fmt:message key="TITLE"/>
</title>
</head>
<body>
<!-- 인사말  -->
<h2>
<fmt:message key="GREETING"/>
</h2>
<!-- 본문 -->
<fmt:message key="BODY"/>
<br/>
<!-- 회사명 -->
<span style="font-size: 10px">
<fmt:message key="COMPANY_NAME"/>
</span>
</body>
</html>
-----------------------------------  
3-16 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/WEB-INF/classes/intro_ko.properties
# intro_ko.properties

TITLE=\ud68c\uc0ac \uc18c\uac1c
GREETING=\uc548\ub155\ud558\uc138\uc694. {0}\ub2d8!... \uc6b0\ub9ac \uc0ac\uc774\ud2b8\ub97c {1}\ubc88\uc9f8 \uc624\uc2e0\uac78 \uac10\uc0ac\ud569\ub2c8\ub2e4.
BODY=\ub2f9\uc0ac\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uac1c\ubc1c\uc744 \uc8fc\uc5c5\ubb34\ub85c \ud558\ub294 \ud68c\uc0ac\uc785\ub2c8\ub2e4..
COMPANY_NAME=(\uc8fc)\ub4c0\ud06c \uc18c\ud504\ud2b8\uc6e8\uc5b4.
-----------------------------------  
3-17 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/WEB-INF/classes/intro_ko.txt
# intro_ko.properties

TITLE=회사 소개
GREETING=안녕하세요. {0}님!... 우리 사이트를 {1}번째 오신걸 감사합니다.
BODY=당사는 소프트웨어 개발을 주업무로 하는 회사입니다..
COMPANY_NAME=(주)듀크 소프트웨어.
-----------------------------------  
3-18 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/fmt06.jsp

<%@page import="java.util.Date"%>
<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html >
<%--
<fmt:setLocale value="en"/>
--%>
<fmt:setLocale value="ko"/>
<fmt:setBundle basename="intro"/>
<fmt:message key="TITLE" var="title"/>
<fmt:message key="GREETING" var="greeting"/>
<fmt:message key="BODY" var="body"/>
<fmt:message key="COMPANY_NAME" var="company_name"/>
<html>
<head>
<title>
<%-- 제목 --%>
${intro}
</title>
</head>
<body>
<!-- 인사말  -->
<h2>${greeting}</h2>
<!-- 본문 -->
${body}
<br/>
<!-- 회사명 -->
<span style="font-size: 10px">
${company_name}
</span>
</body>
</html>
-----------------------------------  
3-19 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/fmt07_1.jsp

<%@ page contentType="text/html; charset=EUC-KR"%>
<!DOCTYPE html >
<html><head><title></title></head>
<body>
<form action="fmt07_2.jsp" method="post">
     이름 : <input type="text" name="name"/><br/><br/>
     방문횟수 : <input type="text" name="num"/><br/><br/>
     <input type="submit" value="전송"/>
</form>
</body>
</html>
-----------------------------------  
3-20 
생성
Workspace : ~\JSP\EclipseWork
/JSTLApp/WebContent/fmt07_2.jsp

<%@page import="java.util.Date"%>
<%@ page contentType="text/html; charset=EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%request.setCharacterEncoding("euc-kr");%>
<!DOCTYPE html >
<%--
<fmt:setLocale value="en"/>
--%>
<fmt:setLocale value="ko"/>
<fmt:setBundle basename="intro"/>
<fmt:message key="TITLE" var="title"/>
<fmt:message key="GREETING" var="greeting">
     <fmt:param>${param.name }</fmt:param>
     <fmt:param>${param.num }</fmt:param>
</fmt:message>
<fmt:message key="BODY" var="body"/>
<fmt:message key="COMPANY_NAME" var="company_name"/>
<html>
<head>
<title>
<%-- 제목 --%>
${intro}
</title>
</head>
<body>
<!-- 인사말  -->
<h2>${greeting}</h2>
<!-- 본문 -->
${body}
<br/>
<!-- 회사명 -->
<span style="font-size: 10px">
${company_name}
</span>
</body>
</html>
-----------------------------------
###################################
4. 과제
-----------------------------------
4-1
게시판 시험은 MVC, JSTL, EL 전부 사용해서 볼 예정
----------------------------------- 
4-2
----------------------------------- 
4-3
----------------------------------- 
4-4
----------------------------------- 
4-5
-----------------------------------
###################################
5. 과제 해결
-----------------------------------
-----------------------------------
###################################
6. 기타
----------------------------------- 

-----------------------------------