localeTest.war
a.jsp
===================
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!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=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<a href="fmt1.jsp?lo=ko">한국어</a>
<a href="fmt1.jsp?lo=en">영어</a>
</body>
</html>
fmt1.jsp
=========================
<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:setLocale value="${param.lo}" />
<fmt:bundle basename="resource.msg" >
<!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=EUC-
KR">
<title>Insert title here</title>
</head>
<body>
<fmt:message key="AAA" /><br>
<fmt:message key="BBB" /><br>
</body>
</html>
</fmt:bundle>
'개발하자 > JSP&Servlet' 카테고리의 다른 글
Bundle사용하여 언어바꾸기 (0) | 2015.03.19 |
---|---|
텍스트필드 입력값 다음페이지로 넘기기 (0) | 2015.03.19 |
국제화태그 setLocale 언어설정하기 (0) | 2015.03.19 |
EL)varStatus와 forEach이용한 예제 (0) | 2015.03.12 |
EL)varStatus속성 (0) | 2015.03.12 |