spring mvc学习(一)之web.xml配置
来源:互联网 发布:苏联打阿富汗知乎 编辑:程序博客网 时间:2024/06/03 11:27
对于java的学习,架构是不可少的,在这里我就以一个菜鸟的身份给大家逐篇介绍我的spring mvc理解,第一篇先来web.xml的配置。
<?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <display-name>Spring3MVC</display-name> <listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener><!-- 加载spring的xml配置文件到 spring的上下文容器中 --><context-param><param-name>contextConfigLocation</param-name><param-value>/WEB-INF/app*.xml</param-value> <!-- 这里为配置applicationContext的路径 --></context-param> <!--log4j配置文件加载--> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>classpath:log4j.properties</param-value> <!-- 这里为配置log4j输出日志的配置文件 --> </context-param> <!--启动一个watchdog线程每1800秒扫描一下log4j配置文件的变化--> <context-param> <param-name>log4jRefreshInterval</param-name> <param-value>1800000</param-value> </context-param> <!--spring log4j监听器--> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <!-- 这里为配置spring启动加载 --> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- 这里为配置servlet名和拦截标签 --> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.*</welcome-file> <welcome-file>reg.jsp</welcome-file> </welcome-file-list> </web-app>
web.xml的配置到此为止了,可能有哪里解释的不好的地方,说出来,大家分享一下,另外哪里有不明的地方,请及时回复,我会第一时间为你解答。
下一篇我将为大家介绍spring mvc的servlet配置和applicationContext的配置。
0 0
- spring mvc学习(一)之web.xml配置
- 【spring MVC学习一】web.xml中的spring的配置
- Spring MVC 原子学习法 之 web.xml 中的配置
- Spring MVC web.xml配置
- Spring MVC +Mybatis + Maven 配置之web.xml配置
- spring mvc Web.xml配置详解之context-param
- [spring]Spring MVC web.xml 配置文件配置
- spring学习笔记一 spring web.xml文件配置详解
- spring mvc web.xml的配置
- spring mvc的web.xml的配置
- Spring MVC web.xml 配置文件配置
- Spring MVC的web.xml配置详解
- spring mvc 的web.xml配置
- spring mvc中web.xml的配置
- Spring MVC的web.xml配置详解
- spring MVC 的 web.xml 配置讲解
- Spring MVC的web.xml配置详解
- Spring MVC的web.xml配置详解
- 018
- OS X Mountain Lion 系统配置 Apache+Mysql+PHP 详细教程
- Codeforces Round #261 (Div. 2)(树状数组,dp,dfs构造序列)
- 放疗流程和相关概念
- YII 配置文件
- spring mvc学习(一)之web.xml配置
- JavaScript解析XML实现省市县三级联动
- Java实现特殊二叉树之堆、哈夫曼树
- Codeforces Round #261 (Div. 2)459D. Pashmak and Parmida's problem(求逆序数对)
- 软硬件接口小笔记-内存结构
- 计算机存储单位
- 我之见--线程调度基本知识
- LeetCode: Reverse Linked List II
- 协同过滤算法简析