상세 컨텐츠

본문 제목

자바 , jsp 로그인할때 다음화면 언어 선택하기

관리X 과거글

by 까먹기전에 2015. 3. 19. 11:27

본문

반응형

==============================시작 화면========================================

<%@ 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">

 <script src="http://code.jquery.com/jquery-1.7.js">

 </script>

<title>Insert title here</title>

</head>

<body>

<script type="text/javascript">

$(document).ready(function(){

$("#ko").click(function(){

var str="?lo=ko&";

str+="id="+$("#id").val();

str+="pw="+$("#pw").val();

alert(str);

location.href="fmt1.jsp"+str

});

$("#en").click(function(){

var str="?lo=en&";

str+="id="+$("#id").val();

str+="pw="+$("#pw").val();

alert(str);

location.href="fmt1.jsp"+str

});

});

</script>

id : <input type="text" id="id">

pw : <input type="text" id="pw">

<a href="#" id="ko">한글</a>

<a href="#" id="en">영어</a>

</body>

</html>


==============================넘어가는 화면=====================================

<%@ 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="a.b.member" >

<!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="MSG"><br>

<fmt:param value="${param.id}"></fmt:param>

<fmt:param value="${param.pw}"></fmt:param>

</fmt:message>

</body>

</html>

</fmt:bundle>


================================ko==================================================

MSG=\uC544\uC774\uB514 : {0} , \uBE44\uBC88 : {1}

================================en=================================================

MSG=ID : {0} , PW : {1}

관련글 더보기