日期:2014-05-17 浏览次数:20847 次
<context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:org/ourpioneer/spring/*.xml,classpath:org/ourpioneer/spring/*/*.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
<filter> <filter-name>EncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>EncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
<servlet> <servlet-name>board</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/Dispatcher-Servlet.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>board</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping>
<!-- 扩展命名拦截器 --> <bean id="extensionInterceptor" class="org.ourpioneer.excel.web.interceptor.ExtensionInterceptor"></bean> <!-- 控制器映射 --> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="interceptors"> <list> <ref bean="extensionInterceptor" /> </list> </property> <property name="mappings"> <props> <prop key="/excel.do">ExcelController</prop> </props> </property> </bean>
<bean id="ExcelController" class="org.ourpioneer.excel.web.controller.ExcelController"> <property name="reportService" ref="reportService" /> <property name="reportView" ref="reportView" /> </bean>
package org.ourpioneer.excel.web.controller; import java.util.HashMap; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.ou