Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 71793 invoked from network); 19 Oct 2010 10:03:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 10:03:10 -0000 Received: (qmail 73521 invoked by uid 500); 19 Oct 2010 10:03:07 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 73304 invoked by uid 500); 19 Oct 2010 10:03:04 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 73296 invoked by uid 99); 19 Oct 2010 10:03:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 10:03:03 +0000 X-ASF-Spam-Status: No, hits=4.7 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of apinder@hotmail.co.uk designates 65.55.90.100 as permitted sender) Received: from [65.55.90.100] (HELO snt0-omc2-s25.snt0.hotmail.com) (65.55.90.100) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 10:02:54 +0000 Received: from SNT141-W64 ([65.55.90.72]) by snt0-omc2-s25.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 19 Oct 2010 03:02:33 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_fbd00e20-a994-439a-9ec9-46c385956d1a_" X-Originating-IP: [95.177.23.10] From: adam pinder To: Subject: RE: Overriding Templates Date: Tue, 19 Oct 2010 11:02:32 +0100 Importance: Normal In-Reply-To: References: ,,,, MIME-Version: 1.0 X-OriginalArrivalTime: 19 Oct 2010 10:02:33.0059 (UTC) FILETIME=[BF8A4330:01CB6F74] X-Virus-Checked: Checked by ClamAV on apache.org --_fbd00e20-a994-439a-9ec9-46c385956d1a_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =20 The theme is set to simple as was for struts 2.0.11 My struts.xml is very plain and i don't see it would help with this particu= lar issue. =20 My jsp contains the following=20 =20
=20 =20 The revised templates were overriding the jar templates in 2.0.11 just not = in 2.2.1 - no code changes have been made so it must be something in how la= test struts2 is working. =20 Looking at the templates for action message/errors in latest jar - they hav= e additonal text regarding parameters etc.. i wondered if maybe the amended= templates are now invalid in some=20 way and so it reverts back to templates in jar file - no errors are logged = though. =20 My action error template contains the following=20 =20 <#if (actionErrors?exists && actionErrors?size > 0)>
<#list actionErrors as error>

${error}

=20 Adam =20 > Date: Tue=2C 19 Oct 2010 11:39:13 +0900 > Subject: Re: Overriding Templates > From: liying.cn.2010@gmail.com > To: user@struts.apache.org >=20 > Hi adam: >=20 > what theme are you using? >=20 > The default theme in Struts2.2.1 is [xhtml]. >=20 > Maybe you need change the default theme or the theme of your tag to [simp= le]. >=20 > Can you show us your setting file(struts.xml and so on) and your jsp code= ? >=20 >=20 > 2010/10/19 adam pinder : > > > > > > > > I have just upgraded struts2 version from 2.0.11 to 2.2.1 and one issue= seems to be that i have amended templates > > > > actionerror.ftl > > actionmessage.ftl > > > > and they were placed into WebContent\template\simple folder in the web = app and with 2.0.11 they overrided the templates in the struts2 core jar fi= le 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 ha= ve 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 upgraded other jars as it seemed appropriate for this stru= ts version. > > > > thanks > > adam > > >=20 > --------------------------------------------------------------------- > To unsubscribe=2C e-mail: user-unsubscribe@struts.apache.org > For additional commands=2C e-mail: user-help@struts.apache.org >=20 = --_fbd00e20-a994-439a-9ec9-46c385956d1a_--