<action name="rsslatest" class="xx.action.rss.RssLatestVideosAction">
<result name="success" type="freemarker">
<param name="location">/cn/rss/rsslatest.ftl</param>
<param name="contentType">application/xml</param>
</result>
</action>
如果不这样写webwork默认返回html
官方文档上列举了如下几个可以使用的 param
<result name="success" type="freemarker">
<param name="location">/cn/rss/rsslatest.ftl</param>
<param name="contentType">application/xml</param>
</result>
</action>
如果不这样写webwork默认返回html
官方文档上列举了如下几个可以使用的 param
- location (default) - the location of the template to process.
parse - true by default. If set to false, the location param will not be parsed for Ognl expressions.
contentType - defaults to "text/html" unless specified.
WebWork RSS 配置详解
本文介绍 WebWork 中 RSS 最新视频配置方法,详细解释了如何通过配置文件指定模板位置及内容类型,同时给出了官方文档中关于参数的具体说明。
207

被折叠的 条评论
为什么被折叠?



