Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Spring
- jsp
- oauth
- ServletContextListener
- 데이터 공유
- 디자인패턴
- tomcat
- 점사라짐
- Servelt
- Container
- @PathVariable
- #페이지이동
- servlet
- 서블릿
- 확장자 사라짐
- ServletConfig
- spring security
- Spring Boot
- #sendRedirect()
- spring5
- #jsp
- MVC
- servletContext
- 서블릿 초기화 파라미터
- #java
- 한글 처리
- 웹 어플리케이션 감시
Archives
- Today
- Total
목록#sendRedirect() (1)
Choi의 고유결계
JSP Servlet: response.sendRedirect() 사용시 주의 해야할 점
response.sendRedirect() 사용시 주의 해야할 점 1. out.print() 무시 sendRedirect가 호출되기 전까지는 앞에서 써왔던 out.print() 들은 무시하게 됩니다. if(vale) { out.print(""); response.sendRedirect("main.html"); } 이 위의 예제를 실행시키면 alert()는 실행 되지 않고 main.html로 이동하게된다. 해결방안 원하는 의도를 내려면 sendRedirect를 사용하기 보다는 javascript를 이용해 페이지를 이동합니다. if(vale) { out.print(""); out.print("location.href = 'main.jsp';"); } print()에 location.herf=’이동할곳’ 이런..
Jsp,Servlet
2018. 11. 28. 14:16