전달 데이터
username=helloage=20쿼리 파라미터는 URL에 ?을 시작으로 데이터를 보낼수있으며, 추가 파라미터는 & (Shift + 7) 로 구분합니다.
http://localhost:8080/request-header?username=shin&age=25URL로 접속합니다.getParameter()메소드에의해 쿼리 파라미터인,username, age가 출력됩니다.
- 대부분 경우에는 단일 파라미터를 조회하지만 복수 파라미터 조회는 알아 보기만 하겠습니다.
http://localhost:8080/request-header?username=shin&age=25&username=kimURL일 경우,getParameterValues()메소드를 사용해 출력합니다.