728x90
html ํ์ผ->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="Newfile.jsp">
์ด๋ฆ:<input type="text" name="name"> <!-- name์ ๊ฐ์ ์ ๋ฌํ๊ธฐ ์ํ ๋ชฉ์ -->
<input type="submit" value="์ด๋">
</form>
</body>
</html>
jsp ํ์ผ-> ์๋ฐ์ฟผ๋ฆฌ๋ <% %> ๋ก ๋ฌถ์ด์ค๋ค
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
// java ์์ญ
String name = request.getParameter("name");
System.out.println("name:" + name);
// Dao, DB ์ ๊ทผ
%>
</body>
</html>
๊ฒฐ๊ณผ์ฐฝ ->
์๋ฌด๊ฒ๋ ์ ๋ ฅํ์ง์์์ null์ด ๋์๋ค
์ด๋ฆ์ ์ ๋ ฅํ๋ฉด ํด๋น ์ด๋ฆ์ด ๋ฌ๋ค
'๐ HTML\CSS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
BMW ํํ์ด์ง ์ฐจ๋ ์ฃผ๋ฌธ์ ๋ง๋ค์ด๋ณด๊ธฐ <๋ฏธ์> (0) | 2021.02.24 |
---|---|
์ค๋ฌธ์กฐ์ฌ ์์ - form์ด์ฉ, jsp (0) | 2021.02.24 |
iframe (web ์์ web) (0) | 2021.02.24 |
List (๋ชฉ๋ก) - ul , ol ํ์ฉ๋ฒ (0) | 2021.02.24 |
Table(ํ ์ด๋ธ)๊ณผ colspan, rowspan (0) | 2021.02.24 |
๋๊ธ