Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Li Ying
My suggestion: You can create a file(or folder) link on your file system. From the view of your web app, it works like a file(or folder) inside the [document root directory], but the real file(or folder) is actually somewhere outside the [document root directory]. 2011/12/8 Gurcharan Singh

Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Gurcharan Singh
Hi Li Sorry, not able to understand your point. Can you kindly elaborate. Thanks! On Tue, Dec 13, 2011 at 8:13 AM, Li Ying liying.cn.2...@gmail.com wrote: My suggestion: You can create a file(or folder) link on your file system. From the view of your web app, it works like a file(or

Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Li Ying
I mean: If the OS is unix/linux, you can create file link (or folder link) on the file system. This doc describes more details: http://www.cyberciti.biz/faq/creating-hard-links-with-ln-command/ 2011/12/13 Gurcharan Singh gurcha...@rachna.co.in: Hi Li Sorry, not able to understand your point.

Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Gurcharan Singh
Thanks for the clarification. Will sure give it a try. On Tue, Dec 13, 2011 at 9:04 AM, Li Ying liying.cn.2...@gmail.com wrote: I mean: If the OS is unix/linux, you can create file link (or folder link) on the file system. This doc describes more details:

Re: Dynamically setting the template directory in an Action

2011-12-09 Thread Josep García
You can try by overriding the default FreemarkerManager, by defining your own in struts.xml: bean type=org.apache.struts2.views.freemarker.FreemarkerManager name=dynamic class=com.mycompany.MyFreeMarkerManager / constant name=struts.freemarker.manager.classname value=dynamic/ and

Re: Dynamically setting the template directory in an Action

2011-12-08 Thread Gurcharan Singh
In the same line, I've a question - How to setup Struts2 to use templates which are located outside document root directory. Why we want to do it - We want to keep UI and Dev work separate and in-case any change is made in the template, we shouldn't be re-building the whole app. Thanks Gurcharan

Re: Dynamically setting the template directory in an Action

2011-11-20 Thread Li Ying
(1)I believe the word [template] in struts2 means, the template file to render a struts2 tag. for example, the file [struts2-core-2.2.3.jar]/template/xhtml/form.ftl is a template file to render the tag s:form using theme xhtml (2)what you are trying to do, is to change the jsp file location

Re: Dynamically setting the template directory in an Action

2011-11-20 Thread Josep García
What I have achieved is to set the template Dir for freemarker result type, in web.xml: !-- struts/freemarker additional template loading: folder -- context-param param-nametemplatePath/param-name param-value${form.templateDir}/param-value /context-param with

Dynamically setting the template directory in an Action

2011-11-10 Thread Chris Rijk
Hi all, Referring to this page: http://struts.apache.org/2.2.1/docs/selecting-template-directory.html It says the template directory can be specified in the session, for example to allow the user to change it on a per-session basis. I've been trying to do this for my application, but can't get