출처 안녕! 넌 내 친구야 | 김지혜
원문 https://blog.naver.com/hijihey/120029801919
[html 파일 ]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=MS949">
<title>
HTML Page
</title>
</head>
<body>
<br>
<applet
codebase = "."
code = "outapplet.outApplet.class"
archive = "outApplet.jar"
name = "TestApplet"
width = "600"
height = "400"
hspace = "0"
vspace = "0"
align = "middle"
>
<PARAM NAME = "ReckeyList" VALUE = "30">
</applet>
</body>
</html>
[jsp 파일]
<%@ page contentType="text/html; charset=euc-kr" %>
<%@ page language = "java" %>
<%@ page import = "javax.servlet.http.*, java.util.*" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=MS949">
<title>
HTML Page
</title>
</head>
<body>
<%
String Reckey = request.getParameter("ReckeyList");
%>
<applet
codebase = "."
code = "outapplet.outApplet.class"
archive = "outApplet.jar"
name = "TestApplet"
width = "700"
height = "400"
hspace = "0"
vspace = "0"
align = "middle"
>
<PARAM NAME = "ReckeyList" VALUE = "<%=Reckey%>" >
</applet>
</body>
</html>
[applet 파일]
.
.
.
public void init() {
try {
jbInit();
String ReckeyList = getParameter("ReckeyList");
sendTest.setText(ReckeyList + "_________________");
} catch (Exception e) {
e.printStackTrace();
}
}
.
.
.
* 전달받은 ReckeyList의 값 30은 int형이 아닌 String 형으로 받는다.
'IT > JAVA' 카테고리의 다른 글
[공유] 서블릿 (servlet) [Eclipse] (0) | 2018.12.27 |
---|---|
[공유] 간단한 JFreeChart 그리기 (0) | 2018.12.27 |
[공유] JSP에서 iBATIS Framework 사용하기. (0) | 2018.12.27 |
[공유] 서버 재시작 없이 스트럿츠 설정 초기화 (0) | 2018.12.27 |
[공유] java.lang.ClassCastException: oracle.sql.CLOB (0) | 2018.12.27 |