Spring 개발자의 도움이 필요합니다.STS 3.1의 Spring MVC 프로젝트
Windows에서 STS 3.1을 사용하고 있습니다. New> Spring Template Project> 'mymvc'라는 이름의 Spring MVC 프로젝트를 선택하여 새로운 MVC 프로젝트를 생성하고 vFabric tc 서버에서 실행했습니다. 브라우저를 http://localhost:8080/mymvc/
으로 지정하면 404 오류가 발생하지만 URL은 http://localhost:8080/app/
일 때 제대로 작동합니다.
하나의 서버에서 응용 프로그램과 프로젝트의 /app
없음 URL 매핑이있다.
내가 누락 되었습니까?
안내하십시오. 감사.
편집 여기
은 web.xml 파일입니다 :
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.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>
</web-app>
한가지 더 : 내 패키지 com.mycompany.app 명명하고 난 프로젝트를 실행할 때 STS는 http://localhost:8080/mymvc/
대신 http://localhost:8080/app/
을 시작했다.
과 같은 과 같은 webcat을 게시 할 수 있습니까? – Rigg802
@ Rigg802 - 편집 된 질문 및 web.xml이 추가되었습니다. 감사. – TechExplorer