Chinaunix首页 | 论坛 | 博客
  • 博客访问: 330765
  • 博文数量: 76
  • 博客积分: 8291
  • 博客等级: 中将
  • 技术积分: 1540
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-22 10:13
文章分类

全部博文(76)

文章存档

2009年(1)

2008年(75)

我的朋友

分类: Java

2008-04-03 09:22:42

单一的配置freemarker.
一、在web.xml中加入以下内容。
   
   
    freemarker   
       
        freemarker.ext.servlet.FreemarkerServlet    
    
   
       
       
        TemplatePath   
        /   
    
   
       
        NoCache   
        true   
    
   
       
        ContentType   
        text/html   
    
   
       
       
        template_update_delay   
        0   
           
    
   
       
        default_encoding   
        UTF-8   
    
   
   
       
        locale   
        zh_CN   
    
   
       
        number_format   
        0.##########   
    
   
       
        auto_import   
        "/template/model.ftl" as model   
    
   
   
    1   
   
   
   
   
    freemarker   
    *.ftl   
  
二、在输出的路径中设置为'/path/index.tld'
阅读(600) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~