日期:2014-05-17 浏览次数:21255 次
<?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>
推荐阅读更多>
-
jsp使用ckeditor直接粘帖图片解决方案
-
jpcap.dll必须放jre的bin目录上
-
wap页面上控件的显示有关问题
-
一套计算机试题,认为自己NB的来答,该如何处理
-
JSP网站开发典型模块与实例精讲解决办法
-
SNMP V3 仍然不安全么
-
怎么在java程序中使用javascript变量
-
struts2用什么方法连接数据库呀?小弟我只知道struts1的连接方法请高手帮忙
-
三星接短信息有关问题
-
Java web项目中,不停中间件更新class文件导致static变量失效有关问题
-
struts 兑现下拉下拉列表 找不到要使用的javabean
-
把jar包拷到WEB-INF/lib跟放到工程之外的路径作为library引用有什么不同
-
java 实现播放器疑问之二解决方案
-
JSP专家分享给大家的一篇关于JSF的入门文章,该如何解决
-
netbean不报错也不继续执行程序是什么情况?解决方法
-
求推荐一本SSH2的开发项目实例尽可能多的书籍
-
高分求JNI实现IE嵌入SWING的C代码!该如何解决
-
WebService接口嵌套调用解决办法
-
腾讯笔试题,该如何处理
-
eclipse debug java程序,为啥不按照行顺序执行