日期:2014-05-17 浏览次数:21248 次
<?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>
推荐阅读更多>
-
有关问题很简单,form表单提交给Action后,返回页面是一个JSP,怎么在返回页面的URL中带一个参数
-
protected访问范围有关问题
-
jsp onkeyup .all[]用法解决方案
-
为什么小弟我的一个TXT文件用记事本打开没有有关问题,用写字板就乱码呢
-
一个“提早运行”奇怪现象
-
Spring中的AOP,以及宣言式事务 @Transactional无法拦截事务
-
一个很困惑的DataSource配置异常!请帮忙解决
-
问个log4j.appender.A2.File有关问题
-
压力测试会把当前的domain压夸吗?该怎么解决
-
JAVA如何变成实现发短信功能
-
什么是哈希表,什么是哈希函数,麻烦通谷,具体点,解决马上给分解决方案
-
javascript如何控制生成的DIV层的位置
-
学了本年JAVA,没点进步和感觉,想参加培训,该如何解决
-
Http Status 500异常
-
Spring 整合mybatis 出现异常,新手求老鸟帮忙
-
jsp中有split函数吗?解决方案
-
J2EE事宜并发控制策略总结
-
jsp如何获得用户所在的位置
-
用户重复登录有关问题
-
请问linkedlist源代码,有点没明白什么意思