STS中web.xml配置文件
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<!-- 设置字符编码,将所有的字符编码同意设置为utf- -->
<filter>
<filter-name>filterEncoding</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>filterEncoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 配置requestcontext监听器 -->
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</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:springmvc.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>
STS中web.xml配置文件的更多相关文章
- 面试题:J2EE中web.xml配置文件详解 背1
一.web.xml是什么 web.xml学名叫部署描述符文件,是在Servlet规范中定义的,是Web应用的配置文件,是Web应用的基础. 二.web.xml加载流程 总的来说:ServletCont ...
- javaWEB中web.xml配置文件相关
1.常用节点的执行顺序: context-param -> listenter -> filter -> servlet -> interceptor,其中有多个filter的 ...
- 关于IDEA中web项目中web.xml配置文件标红的解决办法
原文链接 https://blog.csdn.net/qq_33451695/article/details/86684127 解决方法前提:web.xml没有实际错误,但依然被web.xml标红 出 ...
- SSM中 web.xml配置文件
<!--核心监听器 当tomcat(web容器,应用服务器,web服务器)启动的时候创建spring 工厂类对象,绑定到tomcat上下文中 --> <listener> &l ...
- STS中logback.xml配置文件
<?xml version="1.0" encoding="UTF-8"?> <configuration debug="false ...
- STS中springmvc.xml配置文件
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- 分布式项目controller项目中web.xml配置文件的编写
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" " ...
- STS中applicationContext.xml配置文件
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- javaweb项目中web.xml配置文件的/和/*的区别
1.拦截"/",可以实现现在很流行的REST风格.很多互联网类型的应用很喜欢这种风格的URL.为了实现REST风格,拦截了所有的请求.同时对*.js,*.jpg等静态文件的访问也就 ...
随机推荐
- R开发环境搭建
1.准备集成开发环境(IDE) R语言在一个好的IDE工具上应用才能更好的发挥它的作用,目前使用的最多的R语言集成开发环境是R STUDIO,下载地址为:https://www.rstudio.com ...
- loadrunner-参数化
参数化的目的: 1.数据库或应用程序对提交请求里的参数值进行唯一性校验 2.为了避免查询缓存导致的性能测试结果失真 (语法检查-语意检查-检查缓存(有直接从数据库给)没有就生成执行计划-按照执行计划去 ...
- HTML5 关于本地操作文件的方法
由于传统 b/s 开发出于安全性的考虑,浏览器对于本地文件的操作权限几乎没有,用户想要操作一个文件基本都是采用先上传到服务器, 再回显给浏览器供用户编辑,裁剪等的方法,这种方式虽然可行,但其对于服务器 ...
- if判断,switch语句
if ; else if; else; 判断操作: 格式示例: public class scanner { public static void main(String[] args){ int a ...
- Vue相关文章
1.新手向:Vue 2.0 的建议学习顺序 2.用webstorm搭建vue项目 3.vue-cli3.0项目结构
- Cannot forward to error page for request ......
今天现场报了以下问题: Cannot forward to error page for request [/order/search] as the response has already bee ...
- 判断序列B是否是序列A的连续子序列
算法思想:因为两个整数序列已存入两个链表中,操作从两个链表的第一个结点开始,若对应得数据相等,则后移指针,若对应的数据不等,则A列表从上次开始比较结点的后继开始,B链表仍从第一个结点开始,直到B链表到 ...
- 第二次oo博客作业--多线程电梯
这次的系列作业是写一个电梯调度,主要目的是让我们熟悉多线程. 第一次作业是一个傻瓜电梯的调度问题,要求也很简单,即每次接一个人就行了.我只用了两个线程,一个是输入线程,一个是电梯线程,输入线程负责从标 ...
- 微信小程序--录音
var app = getApp(), $ = require("../../utils/util.js"); const recorderManager = wx.getReco ...
- Window上编译最新版libCef(Branch 2704)(转载)
转自http://blog.csdn.net/mfcing/article/details/52066579 1.开发环境搭建 VS2010及以上版本,CMake 2.8.12.1及以上版本.我安 ...