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 ...
随机推荐
- ActiveMQ在Windows下的安装与启动(懒人专属)
其实这些ActiveMQ官网都有,但是如果你懒得看官网,那就直接看这吧! 1. 官网下载最新的ActiveMQ安装包 apache-activemq-x.x.x-bin.zip并解压 2.进入安装 ...
- inode索引详解
理解inode inode是一个重要概念,是理解Unix/Linux文件系统和硬盘储存的基础. 我觉得,理解inode,不仅有助于提高系统操作水平,还有助于体会Unix设计哲学,即如何把底层的复杂性抽 ...
- python元组,集合类型,及字典补充
一.元组 元组与列表基本相同,不同之处在于元组只能存不能取,当多个值没有改的需求时,用元组更合适 元组的基本操作 1.创建元组: t = (1, 2, 3, 4, 2,4,) t = (1,) #单个 ...
- XmlDocument.Load(url) 本地和http远程
XmlDocument.Load(url) 的使用 远程: string path = @"http://localhost:8080/Source/XMLConfig.xml"; ...
- SQL Server 数据恢复到指点时间点(完整恢复)
SQL Server 数据恢复到指点时间点(完整恢复) 高文龙关注2人评论944人阅读2017-03-20 12:57:12 SQL Server 数据恢复到指点时间点(完整恢复) 说到数据库恢复,其 ...
- Confluence 6 手动备份
Confluence 的 Attachment Storage Configuration 可以配置 Confluence 将附件存储在 home directory,或者是存储在数据库中. Dat ...
- Confluence 6 配置避免管理员联系表单垃圾
你可以配置 Confluence 使用验证码(Captcha)来避免垃圾内容发送给 Confluence 管理员.有关管理员联系表单验证码的内容在全站验证码设置中进行配置,相关的文档请参考 Confi ...
- Confluence 6 禁用管理员联系表单
如果你希望禁用这个功能,不允许用户通过发送电子邮件的方式联系站点管理员.你可以禁用这个页面中有关输入用户信息发送电子邮件的部分.你只能禁用用户电子邮件输入表单,如果你按照上面描述的步骤在 'Custo ...
- Confluence 6 配置管理员联系页面
管理员联系页面是一个格式化的页面,这个页面能够允许 Confluence 用户在 Confluence 中向管理员发送消息(在这部分的内容,管理员是默认管理员用户组的成员). 有关用户组的解释,请参考 ...
- JAVA项目中常用的异常处理情况总结
JAVA项目中常用的异常知识点总结 1. java.lang.nullpointerexception这个异常大家肯定都经常遇到,异常的解释是"程序遇上了空指针",简单地说就是调用 ...