tomcat web.xml 예제
2016. 7. 25. 13:39ㆍ웹랩
반응형
<?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_2_5.xsd"
id="WebApp_ID" version="2.5">
<!-- JDBC 연결을 위한 정보 -->
<resource-ref>
<description>OracleDatasource</description>
<res-ref-name>jdbc/myoracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<context-param>
<param-name>ds</param-name>
<param-value>jdbc/myoracle</param-vlaue>
</context-param>
<!-- Filter 설정 (Encoding Filter) -->
<filter>
<filter-name>Encoding Filter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Encoding Filter</filter-name>
<servlet-name>action</servlet-name>
</filter-mapping>
<!-- servlet 설정 -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- 세션 기간 설정 -->
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<servlet>
<servlet-name>adder-servlet</servlet-name>
<servlet-class>AdderServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>adder-servlet</servlet-name>
<url-pattern>/adder</url-pattern>
</servlet-mapping>
<!-- 시작페이지 설정 -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- 존재하지 않는 페이지, 404에러 -->
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
<!-- 500에러 -->
<error-page>
<error-code>500</error-code>
<location>/500.jsp</location>
</error-page>
<!-- NullpointException발생시 처리 페이지 설정 -->
<error-page>
<exception-type>java.lang.NullPointerException</exception-type>
<location>/null.jsp</location>
</error-page>
<!-- 태그 라이브러리 설정 (JSTL"coreTag"을(를) 사용)-->
<jsp-config>
<taglib>
<taglib-url>http://java.sun.com/jsp/jstl/core</taglib-url>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>
반응형
'웹랩' 카테고리의 다른 글
strpos 또는 match 함수를 이용한 포함하는 문자 찾기 (0) | 2017.11.28 |
---|---|
슬림한 스크롤바 플러그인 (0) | 2016.09.08 |
sql 컬럼 값의 특정 단어 바꾸는 방법 (0) | 2016.07.25 |
소스코드 구문 강조 (코드 하이라이터) (0) | 2016.07.25 |
티스토리 파일 경로 확인하기 (0) | 2016.07.25 |