日期:2014-05-17 浏览次数:20801 次
<?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>
![]()
推荐阅读更多>
- Struts ActionSupport init方法,该如何处理
- 设置下载.bak文件,为什么浏览器直接打开了?该怎么处理
- 计算机编码中 -93 是什么?该怎么处理
- 求大神帮忙,关于文件上传有关问题
- 从jsp表单里得到的中文是乱码解决方案
- Java ban股票系统软件开发 给钱。该怎么解决
- fdsafsa,该如何解决
- 如何办啊,大家快来看看吧
- 小弟我用Spring控制Hibernate,但无法自动生成数据库,这是日志,求解
- java实施的sql有中文,获取不了记录
- CommonUpload上传文件为什么总是在根目录,该如何处理
- jar不是内部或外部命令,该如何解决
- 初学者问乱码的有关问题
- hibernate,2个线程查询id=一的实体,查出来的2个是同一个内存上还是不同的
- servlet与jsp页面中的参数传递有关问题
- javascript怎么遍历后台request传过来的List对象
- cfx Spring 跟 Spring MVC一起用报错
- eclipse出有关问题了,
- 最简略的ssh1和ssh2架构
- Java Web解决方案