随笔 - 55  文章 - 187  trackbacks - 0
<2009年11月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

常用链接

留言簿(12)

随笔分类

随笔档案

groovy

搜索

  •  

最新评论

阅读排行榜

评论排行榜

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:web
="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    id
="WebApp_ID" version="2.5">
    
<display-name>fmtest</display-name>
    
<welcome-file-list>
        
<welcome-file>index.html</welcome-file>
        
<welcome-file>index.htm</welcome-file>
        
<welcome-file>index.jsp</welcome-file>
        
<welcome-file>default.html</welcome-file>
        
<welcome-file>default.htm</welcome-file>
        
<welcome-file>default.jsp</welcome-file>
    
</welcome-file-list>

    
<context-param>
        
<param-name>contextConfigLocation</param-name>
        
<param-value>/WEB-INF/config/service-context.xml</param-value>
    
</context-param>
    
<listener>
        
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    
</listener>

    
<filter>
        
<display-name>Stripes Filter</display-name>
        
<filter-name>StripesFilter</filter-name>
        
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
        
<init-param>
            
<param-name>ActionResolver.Packages</param-name>
            
<param-value>net.sourceforge.stripes.examples</param-value>
        
</init-param>
        
<init-param>
            
<param-name>Interceptor.Classes</param-name>
            
<param-value>net.sourceforge.stripes.integration.spring.SpringInterceptor</param-value>
        
</init-param>
    
</filter>
    
<filter-mapping>
        
<filter-name>StripesFilter</filter-name>
        
<servlet-name>StripesDispatcher</servlet-name>
    
</filter-mapping>

    
<servlet>
        
<servlet-name>StripesDispatcher</servlet-name>
        
<servlet-class>net.sourceforge.stripes.controller.DispatcherServlet</servlet-class>
        
<load-on-startup>1</load-on-startup>
    
</servlet>
    
<servlet-mapping>
        
<servlet-name>StripesDispatcher</servlet-name>
        
<url-pattern>*.action</url-pattern>
    
</servlet-mapping>

    
<servlet>
        
<servlet-name>Freemarker</servlet-name>
        
<servlet-class>freemarker.ext.servlet.FreemarkerServlet</servlet-class>
        
<init-param>
            
<param-name>TemplatePath</param-name>
            
<param-value>/</param-value>
        
</init-param>
        
<init-param>
            
<param-name>template_update_delay</param-name>
            
<param-value>0</param-value> <!-- 0 is for dev only! Use higher value otherwise. -->
        
</init-param>
        
<init-param>
            
<param-name>DefaultEncoding</param-name>
            
<param-value>utf-8</param-value>
        
</init-param>
        
<load-on-startup>1</load-on-startup>
    
</servlet>
    
<servlet-mapping>
        
<servlet-name>Freemarker</servlet-name>
        
<url-pattern>*.ftl</url-pattern>
    
</servlet-mapping>

</web-app>
posted on 2009-11-25 15:45 大卫 阅读(1748) 评论(2)  编辑  收藏 所属分类: Java

FeedBack:
# re: 我的web.xml(freemarker+stripes+spring) 2009-11-26 10:44 零全零美
<servlet-mapping>
<servlet-name>Freemarker</servlet-name>
<url-pattern>*.ftl</url-pattern>
</servlet-mapping>
为什么不直接用*.html或*.htm呢,.ftl对编辑工具不太友好啊!  回复  更多评论
  
# re: 我的web.xml(freemarker+stripes+spring) 2009-11-26 21:54 大卫
@零全零美
不错的建议,谢谢关注!  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航:
博客园   IT新闻   Chat2DB   C++博客   博问