2017-10-30 1 views
0

すべて 私は単純なログインプロジェクトを開発していて、Tomcatサーバーでアプリケーションを実行しようとしているので、「プロジェクトファセット動的Webモジュールのバージョンエラーを変更できません」という問題もいくつかありました。モジュールのバージョンを変更し、適切なjava jeeが存在することを確認して解決しようとしましたが、失敗しました。 SampleLoginApp-servlet.xml:一致するワイルドカードは厳密ですが、要素 'mvc:annotation-driven'の宣言は見つかりません。 StandardWrapper.Throwable

enter code here 

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:mvc="http://www.springframework.org/schema/mvc" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> 


    <context:component-scan base-package="com.sample.Controller"></context:component-scan> 
    <mvc:annotation-driven></mvc:annotation-driven> 


    <bean id="jspviewresolver" 
     class="org.springframework.web.servlet.view.InternalResourceViewResolver"> 
     <property name="prefix" value="/WEB-INF/jsps/"></property> 
     <property name="suffix" value=".html"></property> 
    </bean> 
</beans> 

web.xmlの

があなたのSampleLoginApp-servlet.xmlではここ

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    id="WebApp_ID" version="2.5"> 
    <display-name>SampleLoginApp</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> 
     <description></description> 
     <display-name>SampleLoginApp</display-name> 
     <servlet-name>SampleLoginApp</servlet-name> 
     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> 
     <load-on-startup>1</load-on-startup> 
    </servlet> 
    <servlet-mapping> 
     <servlet-name>SampleLoginApp</servlet-name> 
     <url-pattern>/</url-pattern> 
    </servlet-mapping> 


</web-app> 

答えて

0

コードを入力して、あなたは私がxsi:schemaLocationはそれのために定義されていることがわかりませんxmlns:mvc="http://www.springframework.org/schema/mvc"

を宣言しました。あなたは次の行に助けを

"http://www.springframework.org/schema/mvc 
http://www.springframework.org/schema/mvc/spring-mvc.xsd" 
+0

おかげで、今コンソールショー、エラーなしを追加することで試すことができますが、Tomcatは、エラーを示す除いて、ローカルホスト上の任意のものを表示しません。 –

+0

今、問題は別のところにあります。コントローラクラスとエラーを投稿できますか? – amdg

関連する問題