web

(웹) Servlet form,action 해석

tpghks9245 2021. 12. 9. 20:11

<code>

 

1<html>

2<head><title>form</title></head>

3<body>

4<form method='post' action='/firstweb/LifecycleServlet'>

5name : <input type='text' name='name'><br>

6<input type='submit' value='ok'><br>

7</form>

8</body>

9</html>

 

6 submit이라는 버튼이 눌렸을때

4 action의 주소로 요청해주세요.

4 요청이 들어갈때 메서드는 post라는 값으로 넣어주세요.