Skip to content

Latest commit

 

History

History
74 lines (42 loc) · 3.18 KB

servlet.adoc

File metadata and controls

74 lines (42 loc) · 3.18 KB

JAVA 웹프로그래머의 기본

한스의 10가지 jsp tip http://blog.naver.com/favome/60002068479

JSP 샘플코드

JSP 2.0에서 변한것

JSP 서블릿 한글문제

HTML에서 웹브라이저가 알 수 있게 인코딩 설정

blob으로 저장된 이미지 파일을 웹에 입출력

Generating Images with JSPs and Servlets : http://today.java.net/pub/a/today/2004/04/22/images.html[http://today.java.net/pub/a/today/2004/04/22/images.html]
http://java.sun.com/j2se/1.5.0/docs/guide/net/http-keepalive.html[http://java.sun.com/j2se/1.5.0/docs/guide/net/http-keepalive.html]

기본 스펙 설명

ServletConfig는 서블릿당 하나 ServletContext는 웹 애플리케이션 당 하나

Listener HttpSessionBindingListener : 자기자신이 Sessoin에 추가,변경될때 이벤트 받을 수 있음

RequestDispatcher RequestDispatcher view = request.getRequsetDispatcher("result.jsp");

Session id 첫번째 응답은 쿠키와 URL재작성을 동시에 사용 (URL재작성은 ;jsessionid=123445 의 형식) URL 재작성을 jsp에서 알아서 붙이려면 <c:url> 혹은 reqsponse.encodeURL(url);