본문 바로가기

Error Notes

WARN [org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/aaa/bbb/dddddd.do] in DispatcherServlet with name 'action'

반응형

1. web.xml 에서 DispatcherServlet 선언이 제대로 되어있는지 확

<servlet>

<servlet-name>appServlet</servlet-name>

<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

<init-param>

<param-name>contextConfigLocation</param-name>

<param-value>classpath:ㄴㄴㄴㄴ.xml</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

 

<servlet-mapping>

<servlet-name>appServlet</servlet-name>

<url-pattern>/</url-pattern>

</servlet-mapping>

<servlet>
		<servlet-name>action</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/WEB-INF/config/springmvc/dispatcher-servlet.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>action</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>
	
	<servlet>
		<servlet-name>rest</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/WEB-INF/config/springmvc/rest-servlet.xml</param-value>
		</init-param>
	</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

 

확인 완료 

 

새로 만든 controller 메서드를 잘 맵핑 시켜줘야 해서 

<mvc:interceptors>
<mvc:interceptor>
<!-- 필터 -->
<mvc:mapping path="/**"/>

<mvc:exclude-mapping path="/ntb/mail/ㄱㄱㄱㄱ.do" />			<!-- 내게 메일 보내기 -->

<!-- 로그인체크 인터셉터 클래스 -->
<bean class="ㅋㅋㅋ.com.util.Interceptor" />
</mvc:interceptor>
</mvc:interceptors>

<mvc:exclude-mapping path="/ntb/mail/ㄱㄱㄱㄱ.do" />

이것만 잘 추가해주면된다 

 

https://www.egovframe.go.kr/home/qainfo/qainfoRead.do?menuNo=69&qaId=QA_00000000000014921 

 

묻고 답하기 | 표준프레임워크 포털 eGovFrame

처리중입니다. 잠시만 기다려주십시오.

www.egovframe.go.kr

 

반응형