본문 바로가기
수업(국비지원)/JSP

[JSP] MVC MODEL1 방식 - web.xml

by byeolsub 2023. 4. 19.
  • web.xml : 클라이언트가 서블릿에 접근할 수 있도록 설정하는 방법

 📌

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
id="webApp_ID" version="4.0">
<!-- web.xml : jsp2 웹 어플리 케이션의 설정 담당 파일 
			 ==> 점차 없어지는 추세 -->
	<display-name>jsp2</display-name>
	<welcome-file-list>
	<welcome-file> index.html</welcome-file>
	<welcome-file> index.jsp</welcome-file>
	<welcome-file> index.htm</welcome-file>
	<welcome-file> default.html</welcome-file>
	<welcome-file> default.jsp</welcome-file>
	<welcome-file> default.htm</welcome-file>
	</welcome-file-list>
<!-- error 페이지 설정 -->
<error-page>
	<error-code>404</error-code>
	<location>/error/error404.jsp</location>
</error-page>
</web-app>