티스토리 뷰
페이지 추가 후 현재 페이지에서 보여짐)
<%@ include file= "~.jsp" %>,
<jsp:include page="~.jsp">
<jsp:param value="apple" name="a" /> => // 여기서 request.getParameter("a") 여야 apple같이 들어감.
</jsp:include>
페이지 추가 후 현재 페이지->다른 페이지로 이동)
<%
pageContext.forward("new.jsp");
%>,
<jsp:forward page="~.jsp">
<jsp:param ... />
</jsp:forward>
이동된 url이 안 보이며 request, response가 유지O
redirect)
response.sendRedirect("~.jsp");
이동된 url이 보이며 request, response가 유지X
에러 페이지 처리)
<에러 발생 jsp 페이지>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" errorPage="error.jsp" %>
해당 jsp 페이지에서 오류나면 error.jsp로 이동함.
<에러 처리 jsp 페이지>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" isErrorPage="true" %>
체크 박스 데이터들)
<input type = "checkbox" name="fruit" value="apple" />
<input type = "checkbox" name="fruit" value="banana"/>
이 체크 박스 두개를 선택 후 form에 전송하면,
String[] datas = request.getParameterValues("fruit"); // apple, banana 데이터 전송됨.
'JSP' 카테고리의 다른 글
서블릿, 서블릿 컨테이너, JSP (0) | 2021.11.29 |
---|
- Total
- Today
- Yesterday
- https://subicura.com/2017/01/19/docker-guide-for-beginners-1.html
- https://jwprogramming.tistory.com/52
- Co
- https://wikidocs.net/68
- https://react.vlpt.us/basic/11-render-array.html
- ㄴ
- https://react.vlpt.us/
- https://velog.io/@juno7803/React%EA%B0%80-%ED%83%9C%EC%96%B4%EB%82%9C-%EB%B0%B0%EA%B2%BD
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |