Servlet과제

hii_·2022년 9월 24일
0
  1. index 페이지에서 regist.html 로 넘어가기
    url : http://localhost:8080/{Context-root}/regist.html
    method : get

-> 그냥 a href이용해서 register.html로 넘기면 됨

  1. regist 페이지에서 Book객체 생성해서 출력
    url : http://localhost:8080/{Context-root}/main
    method : post
    hidden : action=regist

-> regist.html에서 form을 button으로 만들어서 submit될 때
form의 action을 main으로 하여 post방식으로 main서블릿으로 넘겨주면서
hidden태그에서 action(act)를 regist로 넘겨주어 main서블릿에서 doPost에서 doGet으로 넘겨주고(한글받는문제때문)
action파라미터를 regist로 받게하여 그에 따른 함수를 만들어 일을 하게 한다.

profile
🐢👩‍💻⛄🤍💜

0개의 댓글