摘要: 普通的struts2配置文件一般是这么配置的: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> /page.jsp 这里的view是一个jsp页面,也可以改成是一个freemarker模板页面: Code highlighting pr... 阅读全文
posted @ 2008-08-28 17:46 魔豆 阅读(4570) 评论(0) 推荐(0) 编辑
摘要: 这篇文章的代码在上篇文章的基础之上,《JSP学习笔记(三十):freemarker入门例子》 把普通类Class1.java改为servlet类,Servlet1.java,并把原来的从输出到页面改为输出到文件。 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.... 阅读全文
posted @ 2008-08-28 14:30 魔豆 阅读(1909) 评论(2) 推荐(0) 编辑
摘要: 1.首先从官方下载freemarker的包,下载地址:http://freemarker.sourceforge.net/freemarkerdownload.html 2.把包lib/freemarker.jar拷贝到项目中 3.新建模板文件WEB-INF/templates/test.ftl,内容如下: Code highlighting produced by Actipro Cod... 阅读全文
posted @ 2008-08-28 11:39 魔豆 阅读(8537) 评论(1) 推荐(0) 编辑
摘要: 代码: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 阅读全文
posted @ 2008-08-28 10:18 魔豆 阅读(1671) 评论(0) 推荐(0) 编辑