web.xml中使用web前缀配置无法访问controller
| <web:context-param> <web:param-name>contextConfigLocation</web:param-name> <web:param-value>classpath:spring/applicationContext.xml</web:param-value> </web:context-param> <web:listener> <web:listener-class>org.springframework.web.context.ContextLoaderListener</web:listener-class> </web:listener> <web:listener> <web:listener-class>org.springframework.web.util.IntrospectorCleanupListener</web:listener-class> </web:listener> <web:servlet> <web:servlet-name>springmvc</web:servlet-name> <web:servlet-class>org.springframework.web.servlet.DispatcherServlet</web:servlet-class> <web:init-param> <web:param-name>contextConfigLocation</web:param-name> <web:param-value>classpath:spring/springmvc.xml</web:param-value> </web:init-param> <web:load-on-startup>1</web:load-on-startup> </web:servlet> <web:servlet-mapping> <web:servlet-name>springmvc</web:servlet-name> <web:url-pattern>/</web:url-pattern> </web:servlet-mapping> |
把web: 去掉
| <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring/applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class> </listener> <servlet> <servlet-name>springmvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring/springmvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>springmvc</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> |
web.xml中使用web前缀配置无法访问controller的更多相关文章
- JSP/JSF从web.xml中取出context-param的配置信息
JSP/JSF从web.xml中取出context-param的配置信息. 应用场景:我们配置了项目的版本信息,想让他显示在页面上,如: <context-param><!-- ## ...
- Tomcat6和7版本对web.xml中taglib标签的配置差异
原来部署在Tomcat6中的应用在Tomcat7中运行时报错如下错误: java.lang.IllegalArgumentException: taglib definition not consis ...
- web.xml中同一servlet/filter配置多个url-pattern
转自:http://blog.sina.com.cn/s/blog_4c2c2a0c0100dh67.html 若你的servlet要多个地址,或你的filter需要过滤不同的url如有*.jsp,* ...
- web.xml的加载过程配置详解
一:web.xml加载过程 简单说一下,web.xml的加载过程.当我们启动一个WEB项目容器时,容器包括(JBoss,Tomcat等).首先会去读取web.xml配置文件里的配置,当这一步骤没有 ...
- [转]web.xml中servlet ,filter ,listener ,interceptor的作用与区别
原文链接:https://blog.csdn.net/netdevgirl/article/details/51483273 一.概念: 1.servlet:servlet是一种运行服务器端的java ...
- java的web.xml中<url-pattern>配置[转]
<servlet-mapping> <servlet-name>downLoadFile</servlet-name> <url-pattern>*.l ...
- servlet中用注解的方式读取web.xml中的配置信息
在学习servletContext的时候,我们知道了可以在web.xml中通过<context-param>标签来定义全局的属性(所有servlet都能读取的信息),并在servlet中通 ...
- web.xml中配置固定数据
在web.xml单个servlet中配置的数据的存取 存: <servlet> <description>This is the description of my J2EE ...
- 在web.xml中配置error-page
在web.xml中配置error-page 在web.xml中有两种配置error-page的方法,一是通过错误码来配置,而是通过异常的类型来配置,分别举例如下: 一. 通过错误码来配置error ...
随机推荐
- 解决log4j和self4j日志报错Could NOT find resource [logback.groovy]及Could NOT find resource [logback-test.xml]问题
事件背景: 我的log4j和self4j按照网上的配置,配置成功了,但是报错如下: 让我很是郁闷,于是找了一大圈........ 解决方案: 总结来说就是:log4j.properties和logba ...
- selenium之css定位小结
前言 大部分人在使用selenium定位元素时,用的是xpath定位,因为xpath基本能解决定位的需求.css定位往往被忽略掉了,其实css定位也有它的价值,css定位更快,语法更简洁.这一篇css ...
- Python-递归、三元表达式列表生成式等
一.函数递归 1.什么是函数递归:函数的递归调用是函数嵌套的一种特殊形式,在调用一个函数的过程中又直接或者间接地调用该函数本身,称之为函数的递归调用 2.递归调用必须明确的两个阶段: 1.回溯:一次次 ...
- C#的winform中控制TextBox中只能输入数字
C#的winform中控制TextBox中只能输入数字 private void textBox3_KeyPress(object sender, System.Windows.Forms.KeyPr ...
- js基础学习
- SwipeRefreshLayout,用最少的代码定制最美的上下拉刷新样式
下拉刷新框架其实有很多,而且质量都比较高.但是在日常开发中,每一款产品都会有一套自己独特的一套刷新样式.相信有很多小伙伴在个性化定制中都或多或少的遇到过麻烦.今天我就给大家推荐一个在定制方面很出彩的一 ...
- 基于AD5663的UV灯电压控制
在开发臭氧发生器的时,我们使用UV灯来实现臭氧的产生.而UV灯的强度决定了臭氧产生的浓度,UV灯的光强则与其控制电压密切相关.所以我们要控制产生的臭氧的浓度就需要调节其控制电压.我们选择了AD5663 ...
- Oracle 高水位说明和释放表空间,加快表的查询速度
高水位的介绍 数据库运行了一段时间,经过一些列的删除.插入.更改操作有些表的高水位线就有可能和实际的表存储数据的情况相差特别多,为了提高检索该表的效率,建议对这些表进行收缩: 查找高水位线的表 查找表 ...
- Confluence 6 XML 备份恢复失败的问题解决
XML 站点备份仅仅针对新数据库恢复的时候是必要的. Upgrading Confluence,Setting up a test server 或者 Production Backup Strate ...
- bzoj 2669 题解(状压dp+搜索+容斥原理)
这题太难了...看了30篇题解才整明白到底咋回事... 核心思想:状压dp+搜索+容斥 首先我们分析一下,对于一个4*7的棋盘,低点的个数至多只有8个(可以数一数) 这样的话,我们可以进行一个状压,把 ...