日期:2014-05-17 浏览次数:21141 次
<?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>
推荐阅读更多>
-
hibernate java.lang.NullPointerException解决方案
-
求switch的特殊用法解决方案
-
JSP中如何样完成本论坛贴子管理那里的给分系统
-
解析页面解决方法
-
国际化有关问题,高分有请XDJM帮出招
-
BufferedReader解决办法
-
各位历害人物,请帮小女子参考一下.解决办法
-
NIO直接从readable里边write
-
JPA抓取谋略:Lazy和Hibernate抓取策略:Lazy的疑问
-
为什么用myeclipse创建在src下的servlet始终不能在工程的classes下创建.class文件?该如何处理
-
java se/ee/me扫盲解决思路
-
求几本算法好书解决方法
-
求解救解决方法
-
散分了,从来没做过的事,分都用不完了解决办法
-
软件开发职业方向的取舍
-
新手,帮忙,jsp怎么插入图片到Access数据库中,并读出显示?
-
大家帮小弟我分析一个方法
-
熟悉webgis开发的大哥大姐帮帮忙解决办法
-
借宝地 诚聘全兼职JAVA工程师 多谢
-
诡异的StringBuffer!该怎么解决