<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>Sample</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<!--
어플리케이션 전체에서 사용하는 초기화 파라미터.
application 에서 사용하며 getInitParameter(paramName), getInitParameterNames() 로 사용 .
예를 들어 데이터베이스 연결과 관련된 설정 파일의 경로나, 로깅 설정 파일,
웹 어플리케이션의 주요 속성 정보를 담고 있는 파일의 경로등을 지정할 때 사용.
-->
<context-param>
<description> 파라미터 설명(필수 아님)</description>
<param-name>paramName</param-name>
<param-value>paramValue</param-value>
</context-param>
<context-param>
<description>로깅 여부</description>
<param-name>logEnabled</param-name>
<param-value>true</param-value>
</context-param>
<!--
JSP 에서 include 디렉티브를 사용하기 위한 설정 값
url-pattern : url 패턴 지정
include-prelude : 모든 페이지 처음에 지정한 페이지가 삽입 됨.
include-coda : 모든 페이지 하단에 지정한 페이지가 삽입 됨.
-->
<jsp-config>
<jsp-property-group>
<url-pattern>/view/*</url-pattern>
<include-prelude>/now.jsp</include-prelude>
<include-coda>/now.jsp</include-coda>
</jsp-property-group>
</jsp-config>
<!--
에러 페이지 설정 방법
- 에러 페이지 우선순위
1. page 디렉티브의 errorPage 속성에서 지정한 에러 페이지를 보여준다.
2. JSP 페이지에서 발생한 익셉션 타입이 web.xml 파일의 <error-type>에서 지정한 익셉션 타입과 동일한 경우 에러 페이지를 보여준다.
3. JSP 페이지에서 발생한 에러 코드가 web.xml 파일의 <error-code>에서 지정한 에러 코드와 동일한 경우 에러 페이지를 보여준다.
4. 웹 컨테이너가 제공하는 기본 에러 페이지를 보여준다.
-->
<error-page>
<error-code>404</error-code>
<location>/error page path.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.NullPointerException</exception-type>
<location>/error/page/path.jsp</location>
</error-page>
<!--
Session Timeout 설정, 단위는 분
값을 0이나 음수로 설정하면 세션은 유효 시간을 갖지 않는다.
session.invalidate() 를 호출하지 않는 이상 session 객체가 사라지지 않는다.
-->
<session-config>
<session-timeout>50</session-timeout>
</session-config>
<!--
서블릿 클래스에 대한 설정
servlet-name : 서블릿 네임
servlet-class : 서블릿 클래스 풀 패스
init-param : 초기화 추가 설정, 여기서 지정한 파라미터는 ServletConfig.getInitParameter() 을 통해서 가져올 수 있다.
param-name : 초기 파라매터 name 값
param-value : 초기 파라매터 value 값
session.invalidate() 를 호추하지 않는 이상 session 객체가 사라지지 않는다.
-->
<servlet>
<servlet-name>DBCPInit</servlet-name>
<servlet-class>com.sample.jdbc.loader.DBCPInit</servlet-class>
<init-param>
<param-name>jdbcdriver</param-name>
<param-value>com.mysql.jdbc.Driver</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- TLD 내용 추가 하기
taglib : 사용할 태그 라이브러리를 지정한다.
taglib-uri : JSP에서 해당 태그 라이브러리를 참조할 때 사용하는 식별자
taglib-location : 태그 라이브러리를 기술한 TLD 파일의 위치를 명시
-->
<jsp-config>
<taglib>
<taglib-uri>
/WEB-INF/tlds/el-functions.tld
</taglib-uri>
<taglib-location>
/WEB-INF/tlds/el-functions.tld
</taglib-location>
</taglib>
</jsp-config>