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 ...
随机推荐
- Linux IO实时监控iostat命令
简介 iostat主要用于监控系统设备的IO负载情况,iostat首次运行时显示自系统启动开始的各项统计信息,之后运行iostat将显示自上次运行该命令以后的统计信息.用户可以通过指定统计的次数和时间 ...
- 37)django-单例模式
一:单例模式 单例模式,是一种常用的软件设计模式.在它的核心结构中只包含一个被称为单例的特殊类. 通过单例模式可以保证系统中一个类只有一个实例.即一个类只有一个对象实例. 常用例子:数据库连接串,只保 ...
- nginx记录post body/payload数据
1. 文档 在nginx中想利用$request_body命令获取post请求的body参数,并落日志,但是发现该变量值为空,查看官网中对$request_body的描述如下: $request_bo ...
- redhat7.3 superset的离线安装
superset是一个python 开发的可视化工具,可以与kylin连接进行数据分析,在官网的讲解中,采用了在线安装方式,生产环境中有yum源,但是没有网,不得不采用离线安装方式.(我们先在有网的环 ...
- wx.chooseImage
<view>上传图片</view> <view> <view> <button bindtap="getImg">上传图 ...
- 【Shared Server Mode】测试调整shared_servers参数对数据库的影响
本文来源于:secooler 的 <[Shared Server Mode]测试调整shared_servers参数对数据库的影响> 关于Shared Server模式的配置方法请参见文 ...
- Confluence 6 配置数字格式
在 Confluence 中使用了 2 种数字格式: 整形数字格式.例如: ############### 小数数字格式.例如:###############.########## Confluenc ...
- Confluence 6 用户目录图例 - 连接 Jira 和 Jira 连接 LDAP
上面的图: Confluence 连接到 JIRA 用户管理,JIRA 使用 LDAP 用户目录. https://www.cwiki.us/display/CONFLUENCEWIKI/Diagra ...
- Python学习【第2篇】:Python数据结构
Python数据结构 1.数字类型 2.字符串 3.列表 4.元组 5.字典 6.集合
- 小学生都看得懂的C语言入门(2): 判别 循环的一些应用实例
1.bool 类型 定义bool类型之前需要导入#include <stdbool.h> #include <stdio.h> #include <stdbool.h&g ...