日期:2014-05-17 浏览次数:21350 次
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.png</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.gif</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
</web-app>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- 自动扫描的包名 -->
<context:component-scan base-package="cn.spring.app.controller" />
<!-- 默认的注解映射的支持 -->
<mvc:annotation-driven />
<!-- 视图解释类 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
</bean>
<!-- 拦截器 -->
<!-- 对静态资源文件的访问 -->
<mvc:default-servlet-handler />
</beans>
推荐阅读更多>
-
想用js或者jquery取出一个页面上的所有文本信息,该如何解决
-
mapping.findForward()执行后,没有跳转页面?解决方法
-
这个compareTo接口程序没有看懂,请帮忙
-
一个float的怪有关问题
-
啊为什么小弟我的图片显示不出来呢
-
留心观察好多网站应用的图片都有自己的戳?解决方法
-
lucence会找到中文,却找不到英文
-
log4j跟spring的配置文件位置-J2SE
-
急求复数与地图的笔试题
-
Test.class正确而t.class就找不到符号,为什么不能用对象?该怎么解决
-
菜鸟怎么开发出一个高质量的J2EE系统
-
如果要把一个SSH的应用放到互联网下,要做些什么
-
用数组寸网页源码,里头的数字有小数点,小数点也算单独的一位么
-
html:file 提交有关问题
-
WTK中怎么删除以前的项目
-
求高手, 热心人帮助!该怎么解决
-
String trim的小疑点
-
抽象类的有关问题
-
java错误的有关问题
-
一个小疑点:大家用Spring的时候是怎么划分xml配置文件的