본문 바로가기

JSP

서블릿 참고 페이지 외

* 서블릿 한글 페이지
http://pllab.kw.ac.kr/j2eeAPIs/api/index.html


* 주요 API 페이지
J2SE 5.0
http://java.sun.com/j2se/1.5.0/docs/api/

J2SE 1.4.2
http://java.sun.com/j2se/1.4.2/docs/api/

J2SE 1.3
http://java.sun.com/j2se/1.3/docs/api/

Servlet 2.3
http://java.sun.com/products/servlet/2.3/javadoc/index.html

Servlet 2.2
http://java.sun.com/products/servlet/2.2/javadoc/index.html

Struts Guide
http://struts.apache.org/userGuide/index.html

Log4j
http://logging.apache.org/log4j/docs/api/index.html


* ServletConfig_ServlerContext
- ServletConfig 인터페이스
   서블릿을 초기화하는 동안에 해당 서블릿에 정보를 전달


- ServlerContext 인터페이스
  동일한 웹 응용 프로그램 내에 소속된 서블릿과 JSP들 간에 서로 정보를 공유할 수 있도록 데이터를 저장하고, 검색


- 서블릿에서 ServletConfig, ServlerContext 객체 얻기
  ServletConfig contig = getServletConfig();
  ServlerContext context = getServletContext();


- 로그 파일 기록 / 절대 경로 구하기
  ServlerContext context = getServletContext();
  context.log("로그 파일.....");
  String root=context.getRealPath("/");


- JSP 절대 경로 구하기
  String root = pageContext.getServletContext().getRealPath("/");

'JSP' 카테고리의 다른 글

이클립스 환경설정 (Server / JSP Servlet)  (0) 2011.12.07
내부 객체와 폼 처리  (0) 2011.12.07
개요  (0) 2011.12.07