日期:2014-05-17 浏览次数:20731 次
<?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>
![]()
推荐阅读更多>
- 又碰到一个HTTP Status 500 有关问题
- jsp页面调用后台连接数据库。数据库不断开?该如何处理
- ~请教大家,还有人用~ANT~给JAVA工程或WEB工程打包的吗?
- Lucene 搜索出正文后,想依照google的结果,截取一段正文,显示搜索列表下解决方法
- 鸡毛信->通配符查找以及模糊查询功能实现
- 新手有关问题,希望大姐大哥们帮帮忙
- tomcat6异常
- 上工好无聊,有极客么,聊一下
- 小程序不知道哪里出错解决方案
- java的对象的引用是指java对象在堆中的内存地址么?该如何处理
- 页面跳转有关问题
- jsp中与此同时设置page的contentType和pageEncoding会怎样
- 求JAVA入门读物
- 100报送.java操作socket.
- 怎么从tomcat连接池配置文件中取出数据库路径
- openfire+coherence分布式集群有关问题
- struts1.2 中 Action和DispatchAction在初始化解决方案
- 新手问个javabean有关问题
- Jsp调用Java类方法为啥会无效
- 关于争议继承父类私有成员有关问题!欢迎斧正