frameworks/JSP_Servlet
[JSP/Servlet]Servlet 본격적으로 살펴보기 (get과 post의 차이,html에서 get리퀘스트하는 방법, post리퀘스트 하는 방법)
iliosncelini
2018. 2. 4. 16:24
・html에서 get을 리퀘스트 하는 방법 :
1.<a>태그의 href프로퍼티 이용 : <a href="/HWorld">
2.html 주소창에 직접 페이지 요청 : http://localhost:8090/helloworld/HWorld
・html에서 post을 리퀘스트 하는 방법 :
1.<input type="submit">
・톰캣 구동후 http://localhost:8090/helloworld/post.html 리퀘스트
・톰캣 was에 의해 html이 자바로 인식되어 리퀘스트 인지
・post <input>클릭시 <form action="PostMethod" method="post">에 의해http://localhost:8090/helloworld/PostMethod으로 맵핑. 이때 전송방식은 post
・ http://localhost:8090/helloworld/PostMethod 리퀘스트
・ http://localhost:8090/helloworld/PostMethod 리퀘스트에 대한 레스폰드(아래)