You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "lei.java@gmail.com" <le...@gmail.com> on 2008/07/04 00:06:09 UTC
Where to put customized template
Hi all,
I modified fielderror.ftl and want to apply it to my app. Could anyone tell
me where I should put it in my app? In WEB-INF/classes/folder or somewhere
else?
Thanks.
Re: Where to put customized template
Posted by "lei.java@gmail.com" <le...@gmail.com>.
Thanks Timothy and Jeromy for your answers. I tried your suggestions but
they are not working.
Basically, I changed the fielderror.ftl by removing the list tags in it and
then saved it to /WEB-INF/classes/template/ folder. Struts2 doesn't look at
the new fielderror.ftl so the error message is still be rendered as a list
item. The same thing if the ftl is put in /WEB-INF/tempalte/ folder. Since
the theme I am using is simple, so no theme.properties file.
I guess the issue is still related to the location. Has anyone customized
templates before?
Thanks.
On Thu, Jul 3, 2008 at 10:30 PM, Jeromy Evans <
jeromy.evans@blueskyminds.com.au> wrote:
> Timothy Wonil Lee wrote:
>
>> I believe the default value is WEB-INF/template, but I may be wrong.
>>
>>
> Almost, the default is in the *classpath* at /template
> So that should read WEB-INF/classes/template
>
> Also, don't forget the theme.properties file.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Where to put customized template
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Timothy Wonil Lee wrote:
> I believe the default value is WEB-INF/template, but I may be wrong.
>
Almost, the default is in the *classpath* at /template
So that should read WEB-INF/classes/template
Also, don't forget the theme.properties file.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Where to put customized template
Posted by Timothy Wonil Lee <ti...@koorong.com.au>.
I believe the default value is WEB-INF/template, but I may be wrong.
The good news is that you can specify it to fit your need.
http://struts.apache.org/2.0.11.2/docs/selecting-template-directory.html
Timothy Wonil Lee
Java Developer
http://timundergod.blogspot.com/
-----Original Message-----
From: lei.java@gmail.com [mailto:lei.java@gmail.com]
Sent: Friday, 4 July 2008 8:06 AM
To: Struts Users Mailing List
Subject: Where to put customized template
Hi all,
I modified fielderror.ftl and want to apply it to my app. Could anyone tell
me where I should put it in my app? In WEB-INF/classes/folder or somewhere
else?
Thanks.
!DSPAM:486d4d83151833671820667!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where to put customized template
Posted by dusty <du...@yahoo.com>.
Its is not /WEB-INF/template. Its /template under your web root.
so its /template/[theme name]/file.ftl
Struts Two wrote:
>
> I tried the samething before but met no success as well. It would be great
> if we could call a field error as follows that generate no html mark-up
> <s:fielderror theme="simple">
> <s:param>field1</s:param>
> </s:fielderror>
> I tried to print the error message right beside each input field. However;
> the html generated mark-up moves the error line to the next line (single
> line is displayed as a list).
>
>
> ----- Original Message ----
> From: "lei.java@gmail.com" <le...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Saturday, July 5, 2008 5:29:24 PM
> Subject: Re: Where to put customized template
>
> Thanks Timothy and Jeromy for your answers. I tried your suggestions but
> they are not working.
>
> Basically, I changed the fielderror.ftl by removing the list tags in it
> and
> then saved it to /WEB-INF/classes/template/ folder. Struts2 doesn't look
> at
> the new fielderror.ftl so the error message is still be rendered as a list
> item. The same thing if the ftl is put in /WEB-INF/tempalte/ folder. Since
> the theme I am using is simple, so no theme.properties file.
>
> I guess the issue is still related to the location. Has anyone customized
> templates before?
>
> Thanks.
>
>
> On Thu, Jul 3, 2008 at 10:30 PM, Jeromy Evans <
> jeromy.evans@blueskyminds.com.au> wrote:
>
>> Timothy Wonil Lee wrote:
>>
>>> I believe the default value is WEB-INF/template, but I may be wrong.
>>>
>>>
>> Almost, the default is in the *classpath* at /template
>> So that should read WEB-INF/classes/template
>>
>> Also, don't forget the theme.properties file.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
>
> __________________________________________________________________
> Connect with friends from any web browser - no download required. Try the
> new Yahoo! Canada Messenger for the Web BETA at
> http://ca.messenger.yahoo.com/webmessengerpromo.php
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Where-to-put-customized-template-tp18269144p18298531.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org