I have reported it to JIRA as a BUG.
https://issues.apache.org/jira/browse/WW-3522
If the develop team confirm that it really is a bug,
then I will add information to the docs.
-
To unsubscribe, e-mail:
changed in later version and developer didn't realise full implications.
anyway, the addition of the context-param sorted out my problem.
thanks for your responses
adam
Date: Wed, 20 Oct 2010 12:01:34 +0900
Subject: Re: Overriding Templates
From: liying.cn.2...@gmail.com
To: user
Just add this to your web.xml:
context-param
param-nametemplatePath/param-name
param-valuetemplate/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.
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-nametemplatePath/param-name
param-valuetemplate/param-value
/context-param
The param
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,
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
If I am the author of this code, i think the priority order
of these 3 TemplateLoaders should be:
1, WebappTemplateLoader
2,ClassTemplateLoader (when value of param [templatePath] is string
starts with class://) or FileTemplateLoader(when value of param
[templatePath] is string starts with
You know that (a) the dev team reads this list, and (b) I'm on the dev
team, right?
On Wed, Oct 20, 2010 at 9:19 AM, Li Ying liying.cn.2...@gmail.com wrote:
If I am the author of this code, i think the priority order
of these 3 TemplateLoaders should be:
1, WebappTemplateLoader
Actually I did not know about these, Sorry.
And
(A)I am just a new guy of Struts2 community, if I put some message
into the Struts2 docs and it is not right, I will mislead so many
users, I will feel so~~~ sorry.
(B)As you can see, my English is not good.
2010/10/20 Dave Newton
(A)I am just a new guy of Struts2 community, if I put some message
into the Struts2 docs and it is not right, I will mislead so many
users, I will feel so~~~ sorry.
Honestly, I'd rather see the documentation reflect current behavior,
whether or not the behavior itself is correct. And if the
OK, I will do it,
But maybe tomorrow, because the local time is over 11PM now.
2010/10/20 Dave Newton davelnew...@gmail.com:
(A)I am just a new guy of Struts2 community, if I put some message
into the Struts2 docs and it is not right, I will mislead so many
users, I will feel so~~~ sorry.
All help is greatly appreciated :)
Thanks!
Dave
On Wed, Oct 20, 2010 at 10:26 AM, Li Ying liying.cn.2...@gmail.com wrote:
OK, I will do it,
But maybe tomorrow, because the local time is over 11PM now.
2010/10/20 Dave Newton davelnew...@gmail.com:
(A)I am just a new guy of Struts2
; PADDING-TOP: 10px; WIDTH: 100%; text-align:
center
#list actionErrors as error
p class=ui-state-highlight${error}/p
/#list
/div
/#if
Adam
Date: Tue, 19 Oct 2010 11:39:13 +0900
Subject: Re: Overriding Templates
From: liying.cn.2...@gmail.com
To: user@struts.apache.org
Hi adam:
what theme
With a lot of debugging, I think i have found what's wrong.
If you use the default setting,
In method [createTemplateLoader] of class
[org.apache.struts2.views.freemarker.FreemarkerManager],
Struts will create 3 TemplateLoader which is:
1,ClassTemplateLoader, which will load Template from class
@Adam
and they were placed into WebContent\template\simple folder
you should start to investigate about your path correctness IMHO .
Struts usually finds freemarker template inside your classpath. In
order to enable struts to find your custom template file, you should
ensure that template files
Hi Maurizio:
In this document:
http://struts.apache.org/2.2.1/docs/template-loading.html
It says the template should be searched in (in this order):
1, web app folder
2, class path
But i have read the Struts2.2.1 source code, it creates TemplateLoader
in a different order, as i described in my
jar file
correctly...
with 2.2.1 it's now always using the templates in the struts2 core jar even
though i can see inside this jar the folder structure and filenames have not
changed..
with 2.2.1 do you need to place the overriding templates in a different folder
for it to work ?
note. i
correctly...
with 2.2.1 it's now always using the templates in the struts2 core jar even
though i can see inside this jar the folder structure and filenames have not
changed..
with 2.2.1 do you need to place the overriding templates in a different
folder for it to work ?
note. i have
18 matches
Mail list logo