2014-12-22 1 views
0

안녕하세요, 저는 Spring 샘플 hello world 프로그램을 실행하려고했습니다. "HTTP 요청// Helloworld/page not found"라는 오류가 발생했습니다. 실제로 새 동적 프로젝트를 만들고 복사가 이전 프로젝트 "디스패처-servlet.xml에"파일을 실행하고 실행하려하지만 오류 위라고 도와도 난 모든게 제대로Spring dispatcher-servlet.xml이 제대로 작동하지 않습니다.

+0

코드를 추가하거나 시도한 내용을 입력하십시오. – user23123412

답변

0

확인하시기 바랍니다 봄 디스패처-servlet.xml 파일 파일과 JAR 파일

을 작성하시기 바랍니다 spring, spring-webmvc, jstl, servlet-api

<beans xmlns="http://www.springframework.org/schema/beans" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> 

<bean name="/welcome.htm" 
class="com.sample.controller.HelloWorldController" /> 

<bean id="viewResolver" 
    class="org.springframework.web.servlet.view.InternalResourceViewResolver" > 
    <property name="prefix"> 
     <value>/WEB-INF/pages/</value> 
    </property> 
    <property name="suffix"> 
     <value>.jsp</value> 
    </property> 
</bean> 

관련 문제