The prefix "mvc" for element "mvc:view-controller" is not bound.

简介: 在Spring配置文件中即dispatcherServlet-servlet.xml配置如下。<!-- 配置直接转发的界面 --> <!-- 可以直接响应转发的页面,而无需再经过Handler 的方法 --> <mvc:view-controller path="/success" view-name="success"

在Spring配置文件中即dispatcherServlet-servlet.xml配置如下。

<!-- 配置直接转发的界面 -->
    <!-- 可以直接响应转发的页面,而无需再经过Handler 的方法 -->
    <mvc:view-controller path="/success" view-name="success" />

通常这个时候会出现如下错误:
这里写图片描述

解决方法
这里写图片描述

xmlns:mvc="http://www.springframework.org/schema/mvc"

xsi:schemaLocation="
    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd"
目录
相关文章
|
Java Apache 容器
Invalid &lt;url-pattern&gt; /admin/*.jsp in filter mapping
完成错误信息 严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.
1125 0
|
12月前
|
Java 测试技术 Spring
Configuration problem: Failed to import bean definitions from URL location classpath:spring-mvc.xml
Configuration problem: Failed to import bean definitions from URL location classpath:spring-mvc.xml
618 0
springMvc21-/textpath/*/helen
springMvc21-/textpath/*/helen
67 0
springMvc21-/textpath/*/helen
|
前端开发
why my employee binding does not work - important MVC debug
Created by Wang, Jerry, last modified on May 20, 2015
79 0
why my employee binding does not work - important MVC debug
|
Web App开发 前端开发 Java
元素 &quot;tx:annotation-driven&quot; 的前缀 &quot;tx&quot; 未绑定
在配置 /projectName/src/main/resources/spring-mybatis.xml 文件添加以下内容, 开启事务注解驱动,启动 Tomcat 时控制台输出以下错误: 严重: Exception sending context i...
863 0
|
前端开发 容器 应用服务中间件
SpringMVC 处理静态资源 &lt;mvc:default-servlet-handler/&gt;
SpringMVC 处理静态资源: 1. 为甚么会有这样的问题: 优雅的 REST 风格的资源URL 不希望带 .html 或 .do 等后缀 若将 DispatcherServlet 请求映射配置为 / , 则SpringMVC 将捕获WEB 容器的所有请求, 包括静态资源的请求, SpringMVC
2524 0
SpringMVC 中 HttpMessageConverter&lt;T&gt;
HttpMessageConverter负责将请求信息转换为一个对象(类型为T),将对象(类型为T)输出为响应信息。 下面我们说一下如何使用。 使用HttpMessageConverter将请求信息转化并绑定到处理方法的入参中或将响应结果转为对应类型的响应信息,SpringMVC提供了两种途径: 使用@RequestBody或@ResponseBody对处理方法进
1373 0
|
前端开发
MVC:The name 'Scripts' does not exist in the current context
汇总:http://www.cnblogs.com/dunitian/p/4523006.html#efmvc 解决:在View下面的Web.Config的namespaces添加    收工   作者:毒逆天 出处:https://www.cnblogs.com/dotnetcrazy 打赏:18i4JpL6g54yAPAefdtgqwRrZ43YJwAV5z 本文版权归作者和博客园共有。
862 0
|
Java 测试技术 Spring
Spring配置问题——元素 &quot;context:component-scan&quot; 的前缀 &quot;context&quot; 未绑定
            今天配置完:                     这句话之后,validating 我的spring配置文件就一直走不下去了。当时以为是myeclipse卡了,之后去掉了所有的validating。
943 0