It's actually more likely the documentation needs to be updated. Perhaps you could get edit access to the wiki and update them?
Dave On Wed, Oct 20, 2010 at 8:47 AM, Li Ying <liying.cn.2...@gmail.com> wrote: > No, I mean it works, but the value "template" has no meaning. > > Actually, if you set param [templatePath] (or [TemplatePath]) to any > string which not start with "class://" or "file://", you will get the > same result: templates under web root folder will be loaded. > > If you delete this param from web.xml, Struts2.2.1 will use the > default setting (which is "class://") to create a ClassTemplateLoader. > And this ClassTemplateLoader will get a higher priority than > WebappTemplateLoader, that make templates under web root folder not > loaded. > > I think this may be a BUG of Struts2, because this behavior is > different from the Struts2 document. > And, as adam said, it also different from the old version of Struts2. > > > 2010/10/20 Dave Newton <davelnew...@gmail.com>: >> So you're saying it doesn't work for him? >> >> Dave >> >> On Wed, Oct 20, 2010 at 5:26 AM, Li Ying <liying.cn.2...@gmail.com> wrote: >>>> Just add this to your web.xml: >>>> >>>> <context-param> >>>> <param-name>templatePath</param-name> >>>> <param-value>template</param-value> >>>> </context-param> >>> >>> The param [templatePath] can start with only "class://" or "file://". >>> Otherwise, struts will ignore it and do not create a >>> TemplateLoader for it. >>> >>> (See method [init] and [createTemplateLoader] of class >>> [org.apache.struts2.views.freemarker.FreemarkerManager]) >>> >>> So, the value "template" means noting, it will get the same result as >>> setting it to a empty string or anything else. >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org