You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yonder <zy...@yahoo.com.cn> on 2011/08/01 12:46:15 UTC
can i override freemarker template
Dear all,
I'm using struts 2.2.3 and conversion plugin. I have set the struts.convention.result.path to '/WEB-INF/views' and I know the convension plugin will searching for results in the Servlet container and in the class path. So can I put the default result template in classpath and if need, override it in the Servlet container?
i.e.
default template : /WEB-INF/views/classpath/WEB-INF/views/actionname.ftl
user-customized : /WEB-INF/views/actionname.ftl
Thanks
Yonder
回复: can i override freemarker template
Posted by Yonder <zy...@yahoo.com.cn>.
Thanks
I've test it.The classpath will be searched first. So I need another solution.
>________________________________
>发件人: Dave Newton <da...@gmail.com>
>收件人: Struts Users Mailing List <us...@struts.apache.org>; Yonder <zy...@yahoo.com.cn>
>发送日期: 2011年8月1日, 星期一, 下午 7:27
>主题: Re: can i override freemarker template
>
>
>I don't recall which will be searched first, or if it will even search both. I've probably just try it.
>That said, if this type of customization is a feature of the application, I've strongly consider a cleaner solution, like serving the templates from a database, or providing a clear, consistent path convention.
>Dave
>
>On Aug 1, 2011 6:47 AM, "Yonder" <zy...@yahoo.com.cn> wrote:
>> Dear all,
>>
>> I'm using struts 2.2.3 and conversion plugin. I have set the struts.convention.result.path to '/WEB-INF/views' and I know the convension plugin will searching for results in the Servlet container and in the class path. So can I put the default result template in classpath and if need, override it in the Servlet container?
>>
>> i.e.
>>
>> default template : /WEB-INF/views/classpath/WEB-INF/views/actionname.ftl
>> user-customized : /WEB-INF/views/actionname.ftl
>>
>>
>> Thanks
>> Yonder
>
>
>
Re: can i override freemarker template
Posted by Dave Newton <da...@gmail.com>.
I don't recall which will be searched first, or if it will even search both.
I've probably just try it.
That said, if this type of customization is a feature of the application,
I've strongly consider a cleaner solution, like serving the templates from a
database, or providing a clear, consistent path convention.
Dave
On Aug 1, 2011 6:47 AM, "Yonder" <zy...@yahoo.com.cn> wrote:
> Dear all,
>
> I'm using struts 2.2.3 and conversion plugin. I have set the
struts.convention.result.path to '/WEB-INF/views' and I know the convension
plugin will searching for results in the Servlet container and in the class
path. So can I put the default result template in classpath and if need,
override it in the Servlet container?
>
> i.e.
>
> default template : /WEB-INF/views/classpath/WEB-INF/views/actionname.ftl
> user-customized : /WEB-INF/views/actionname.ftl
>
>
> Thanks
> Yonder