== Explaination == JSP (Request, Response) 클라이언트(form) -> 서버로 전송 html 에서 작성한 텍스트 박스등에 입력된 값을 서버로 전송 전송방식 2가지 1. Get : 주소에 넣어서 보내는 방식 사용자의 data 가 표시 2. post : 주소에 넣지 않고 보내는 방식 // form method="get" or "post" 넣어주면 된다. action="receive.jsp" // 3. html 이 메인 역활을 하므로 주소창에 파일이름.html 을 설정한다. == Source Code == === html File === {{{~cpp
ID :
PW :
sport music movie drama

spring
summer
}}} === receive.jsp File === {{{~cpp <% String id = request.getParameter("id"); String pass = request.getParameter("pass"); String list = request.getParameter("name"); String hobby[] = request.getParameterValues("hobby"); String hobby_list = " "; String season = request.getParameter("season"); for(int i=0; i < hobby.length; i++) { hobby_list = hobby_list + hobby[i] + " "; } if(list.equals("1")){ %> Heo
<% } else { %> Jun
<% } %> <%=id%>
<%=pass%>
<%=list%> 내가 좋아하는 분야는 <%=hobby_list%>
내가 좋아하는 계절은 <%=season%> }}} == Thread == [JSP]