매핑을 위한 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">
  <display-name>MemberEx</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>
  
	<servlet>
		<servlet-name>Controller</servlet-name>
		<servlet-class>control.Controller</servlet-class>
		<init-param>
			<param-name>configFile</param-name>
			<param-value>WEB-INF/handler.properties</param-value>
		</init-param>
	</servlet>
	<servlet-mapping>
		<servlet-name>Controller</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>
	  
</web-app>

핸들러를 사용해 컨트롤러 조회를 위한 handler.properties

# handler.properties
/main.do=handler.MainHandler
/loginForm.do=handler.LoginFormHandler
/loginPro.do=handler.LoginProHandler
/logout.do=handler.LogoutHandler
/deleteForm.do=handler.DeleteFormHandler
/deletePro.do=handler.DeleteProHandler
/modifyForm.do=handler.ModifyFormHandler
/modifyView.do=handler.ModifyViewHandler
/modifyPro.do=handler.ModifyProHandler
/inputForm.do=handler.InputFormHandler
/inputPro.do=handler.InputProHandler
/confirm.do=handler.ConfirmHandler

인터페이스 CommanHandler.java

package handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface CommandHandler {
	public String process( HttpServletRequest request, HttpServletResponse reponse )
		throws Throwable;
}