Author Login
Post Reply
user Digest 22 Jul 2009 23:52:27 -0000 Issue 8766
Topics (messages 200986 through 201006):
Re: Upgrading xWork??
200986 by: Hoying, Ken
200987 by: Haroon Rafique
200988 by: Wes Wannemacher
200989 by: Hoying, Ken
200990 by: Hoying, Ken
200994 by: Chris Pratt
200995 by: Hoying, Ken
200996 by: Chris Pratt
201005 by: Martin Gainty
[U] Struts2 Portlet with Spring
200991 by: Ginn, Timothy D Mr CTR USA TRADOC USAAC
200993 by: Wes Wannemacher
s2 currency and internationalization
200992 by: kaphilmore
studying struts2 framework, ActionInvocation question
200997 by: Dimitrios Christodoulakis
200999 by: Musachy Barroso
201000 by: Dimitrios Christodoulakis
201006 by: Martin Gainty
Re: How to fix this error.
200998 by: Dave Newton
.action suffix - how to control it?
201001 by: David C. Hicks
201002 by: Martin Uhlir
201003 by: Musachy Barroso
201004 by: David C. Hicks
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_200986.ezm (zipped)I mis-typed to Struts version we are using. It is 2.0.11.1.
I looked at the code history and interestingly enough, this fix does not appear to be in any 2.0.x release, including the latest 2.0.7 from 11/15/08.
However, the fix is included in release 2.1.0 from 10/15/07.
Does anyone have experience using an xWork version 2.1.x with Struts 2.0.11.1?
Thank you!
Ken
-----Original Message-----
From: Hoying, Ken [mailto:Ken_Hoying@(protected)]
Sent: Wednesday, July 22, 2009 12:47 PM
To: user@(protected)
Subject: Upgrading xWork??
We are running with Struts 2.0.1.1 (which uses xWork 2.0.4) and are noticing that we are getting hung threads sometimes on a HashMap call from com.opensymphony.xwork2.util.LocalizedTextUtil.
It looks like the xWork code is question needs to be synchronized and is causing the threads to lock due to corruption in the HashMap. The problem code from xWork 2.0.4 is:
private static MessageFormat buildMessageFormat(String pattern, Locale locale) {
MessageFormatKey key = new MessageFormatKey(pattern, locale);
MessageFormat format = (MessageFormat) messageFormats.get(key);
if (format == null) {
format = new MessageFormat(pattern);
format.setLocale(locale);
format.applyPattern(pattern);
messageFormats.put(key, format);
}
return format;
}
I noticed that in later version of xWork this appears to have been fixed by the following change:
private static MessageFormat buildMessageFormat(String pattern, Locale locale) {
MessageFormatKey key = new MessageFormatKey(pattern, locale);
MessageFormat format = null;
synchronized(messageFormats) {
format = (MessageFormat) messageFormats.get(key);
if (format == null) {
format = new MessageFormat(pattern);
format.setLocale(locale);
format.applyPattern(pattern);
messageFormats.put(key, format);
}
}
return format;
}
So my question is, has anyone attempted to upgrade the xWork library to a later version in Struts 2.0.1.1? And if so, what version did you use and what was your experience?
Thank you in advance!
Ken
-----------------------------------------
***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc.

Attachment:
user_200987.ezm (zipped)On Today at 1:04pm, HK=>Hoying, Ken <Ken_Hoying@(protected):
HK> [..snip..]
HK>
HK> Does anyone have experience using an xWork version 2.1.x with Struts 2.0.11.1?
HK>
I say this, based on no evidence other than remembering it from a thread
earlier, that xwork 2.1.x is incompatiple with struts 2.0.x because of lot
of internal changes. I know for sure that the other way around, i.e.,
struts 2.1.x will not work with xwork 2.0.x.
Later,
--
Haroon Rafique
<haroon.rafique@(protected)>

Attachment:
user_200988.ezm (zipped)I would say that you're better off grabbing the source for the version
you are using and adding that fix you found and building your own
copy. It's not great, but if you don't want to upgrade to struts
2.1.x, then patching is your best bet.
-Wes
On Wed, Jul 22, 2009 at 1:25 PM, Haroon
Rafique<haroon.rafique@(protected):
> On Today at 1:04pm, HK=>Hoying, Ken <Ken_Hoying@(protected):
>
> HK> [..snip..]
> HK>
> HK> Does anyone have experience using an xWork version 2.1.x with Struts 2.0.11.1?
> HK>
>
> I say this, based on no evidence other than remembering it from a thread
> earlier, that xwork 2.1.x is incompatiple with struts 2.0.x because of lot
> of internal changes. I know for sure that the other way around, i.e.,
> struts 2.1.x will not work with xwork 2.0.x.
>
> Later,
> --
> Haroon Rafique
> <haroon.rafique@(protected)>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

Attachment:
user_200989.ezm (zipped)Thank you, Haroon.
I looked through the forum originally but may have missed the post. I will take another look.
Thank you,
Ken
-----Original Message-----
From: Haroon Rafique [mailto:haroon.rafique@(protected)]
Sent: Wednesday, July 22, 2009 1:25 PM
To: Struts Users Mailing List
Subject: RE: Upgrading xWork??
On Today at 1:04pm, HK=>Hoying, Ken <Ken_Hoying@(protected):
HK> [..snip..]
HK>
HK> Does anyone have experience using an xWork version 2.1.x with Struts 2.0.11.1?
HK>
I say this, based on no evidence other than remembering it from a thread earlier, that xwork 2.1.x is incompatiple with struts 2.0.x because of lot of internal changes. I know for sure that the other way around, i.e., struts 2.1.x will not work with xwork 2.0.x.
Later,
--
Haroon Rafique
<haroon.rafique@(protected)>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
-----------------------------------------
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

Attachment:
user_200990.ezm (zipped)Thanks, Wes.
That is our fallback plan and most likely the route we will take.
Thanks,
Ken
-----Original Message-----
From: Wes Wannemacher [mailto:wesw@(protected)]
Sent: Wednesday, July 22, 2009 1:33 PM
To: Struts Users Mailing List
Subject: Re: Upgrading xWork??
I would say that you're better off grabbing the source for the version you are using and adding that fix you found and building your own copy. It's not great, but if you don't want to upgrade to struts 2.1.x, then patching is your best bet.
-Wes
On Wed, Jul 22, 2009 at 1:25 PM, Haroon
Rafique<haroon.rafique@(protected):
> On Today at 1:04pm, HK=>Hoying, Ken <Ken_Hoying@(protected):
>
> HK> [..snip..]
> HK>
> HK> Does anyone have experience using an xWork version 2.1.x with Struts 2.0.11.1?
> HK>
>
> I say this, based on no evidence other than remembering it from a
> thread earlier, that xwork 2.1.x is incompatiple with struts 2.0.x
> because of lot of internal changes. I know for sure that the other way
> around, i.e., struts 2.1.x will not work with xwork 2.0.x.
>
> Later,
> --
> Haroon Rafique
> <haroon.rafique@(protected)>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
-----------------------------------------
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

Attachment:
user_200994.ezm (zipped)If I remember correctly there was a 2.0.5 that was probably compatible with
the 2.0.x versions of Struts 2, but I have no idea if that fix is in that
version.
(*Chris*)
On Wed, Jul 22, 2009 at 9:47 AM, Hoying, Ken <Ken_Hoying@(protected):
> We are running with Struts 2.0.1.1 (which uses xWork 2.0.4) and are
> noticing that we are getting hung threads sometimes on a HashMap call from
> com.opensymphony.xwork2.util.LocalizedTextUtil.
>
> It looks like the xWork code is question needs to be synchronized and is
> causing the threads to lock due to corruption in the HashMap. The problem
> code from xWork 2.0.4 is:
>
> private static MessageFormat buildMessageFormat(String pattern, Locale
> locale) {
> MessageFormatKey key = new MessageFormatKey(pattern, locale);
> MessageFormat format = (MessageFormat) messageFormats.get(key);
> if (format == null) {
> format = new MessageFormat(pattern);
> format.setLocale(locale);
> format.applyPattern(pattern);
> messageFormats.put(key, format);
> }
>
> return format;
> }
>
> I noticed that in later version of xWork this appears to have been fixed by
> the following change:
>
> private static MessageFormat buildMessageFormat(String pattern, Locale
> locale) {
> MessageFormatKey key = new MessageFormatKey(pattern, locale);
> MessageFormat format = null;
> synchronized(messageFormats) {
> format = (MessageFormat) messageFormats.get(key);
> if (format == null) {
> format = new MessageFormat(pattern);
> format.setLocale(locale);
> format.applyPattern(pattern);
> messageFormats.put(key, format);
> }
> }
>
> return format;
> }
>
>
>
> So my question is, has anyone attempted to upgrade the xWork library to a
> later version in Struts 2.0.1.1? And if so, what version did you use and
> what was your experience?
>
> Thank you in advance!
> Ken
>
>
>
> -----------------------------------------
> ***Note:The information contained in this message may be privileged
> and confidential and protected from disclosure. If the reader of
> this message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient,
> you are hereby notified that any dissemination, distribution or
> copying of this communication is strictly prohibited. If you have
> received this communication in error, please notify the Sender
> immediately by replying to the message and deleting it from your
> computer. Thank you. Premier Inc.

Attachment:
user_200995.ezm (zipped)I checked and it was not. Thank you though. It only seems to appear in the 2.1.x versions.
-----Original Message-----
From: Chris Pratt [mailto:thechrispratt@(protected)]
Sent: Wednesday, July 22, 2009 4:08 PM
To: Struts Users Mailing List
Subject: Re: Upgrading xWork??
If I remember correctly there was a 2.0.5 that was probably compatible with the 2.0.x versions of Struts 2, but I have no idea if that fix is in that version.
(*Chris*)
On Wed, Jul 22, 2009 at 9:47 AM, Hoying, Ken <Ken_Hoying@(protected):
> We are running with Struts 2.0.1.1 (which uses xWork 2.0.4) and are
> noticing that we are getting hung threads sometimes on a HashMap call
> from com.opensymphony.xwork2.util.LocalizedTextUtil.
>
> It looks like the xWork code is question needs to be synchronized and
> is causing the threads to lock due to corruption in the HashMap. The
> problem code from xWork 2.0.4 is:
>
> private static MessageFormat buildMessageFormat(String pattern, Locale
> locale) {
> MessageFormatKey key = new MessageFormatKey(pattern, locale);
> MessageFormat format = (MessageFormat) messageFormats.get(key);
> if (format == null) {
> format = new MessageFormat(pattern);
> format.setLocale(locale);
> format.applyPattern(pattern);
> messageFormats.put(key, format);
> }
>
> return format;
> }
>
> I noticed that in later version of xWork this appears to have been
> fixed by the following change:
>
> private static MessageFormat buildMessageFormat(String pattern, Locale
> locale) {
> MessageFormatKey key = new MessageFormatKey(pattern, locale);
> MessageFormat format = null;
> synchronized(messageFormats) {
> format = (MessageFormat) messageFormats.get(key);
> if (format == null) {
> format = new MessageFormat(pattern);
> format.setLocale(locale);
> format.applyPattern(pattern);
> messageFormats.put(key, format);
> }
> }
>
> return format;
> }
>
>
>
> So my question is, has anyone attempted to upgrade the xWork library
> to a later version in Struts 2.0.1.1? And if so, what version did you
> use and what was your experience?
>
> Thank you in advance!
> Ken
>
>
>
> -----------------------------------------
> ***Note:The information contained in this message may be privileged
> and confidential and protected from disclosure. If the reader of this
> message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you
> are hereby notified that any dissemination, distribution or copying of
> this communication is strictly prohibited. If you have received this
> communication in error, please notify the Sender immediately by
> replying to the message and deleting it from your computer. Thank
> you. Premier Inc.

Attachment:
user_200996.ezm (zipped)I'd still suggest making your changes to the 2.0.5 source, since it most
likely has other bug fixes that you just haven't needed yet.
(*Chris*)
On Wed, Jul 22, 2009 at 1:21 PM, Hoying, Ken <Ken_Hoying@(protected):
> I checked and it was not. Thank you though. It only seems to appear in
> the 2.1.x versions.
>
> -----Original Message-----
> From: Chris Pratt [mailto:thechrispratt@(protected)]
> Sent: Wednesday, July 22, 2009 4:08 PM
> To: Struts Users Mailing List
> Subject: Re: Upgrading xWork??
>
> If I remember correctly there was a 2.0.5 that was probably compatible with
> the 2.0.x versions of Struts 2, but I have no idea if that fix is in that
> version.
> (*Chris*)
>
>
> On Wed, Jul 22, 2009 at 9:47 AM, Hoying, Ken <Ken_Hoying@(protected)
> >wrote:
>
> > We are running with Struts 2.0.1.1 (which uses xWork 2.0.4) and are
> > noticing that we are getting hung threads sometimes on a HashMap call
> > from com.opensymphony.xwork2.util.LocalizedTextUtil.
> >
> > It looks like the xWork code is question needs to be synchronized and
> > is causing the threads to lock due to corruption in the HashMap. The
> > problem code from xWork 2.0.4 is:
> >
> > private static MessageFormat buildMessageFormat(String pattern, Locale
> > locale) {
> > MessageFormatKey key = new MessageFormatKey(pattern, locale);
> > MessageFormat format = (MessageFormat) messageFormats.get(key);
> > if (format == null) {
> > format = new MessageFormat(pattern);
> > format.setLocale(locale);
> > format.applyPattern(pattern);
> > messageFormats.put(key, format);
> > }
> >
> > return format;
> > }
> >
> > I noticed that in later version of xWork this appears to have been
> > fixed by the following change:
> >
> > private static MessageFormat buildMessageFormat(String pattern, Locale
> > locale) {
> > MessageFormatKey key = new MessageFormatKey(pattern, locale);
> > MessageFormat format = null;
> > synchronized(messageFormats) {
> > format = (MessageFormat) messageFormats.get(key);
> > if (format == null) {
> > format = new MessageFormat(pattern);
> > format.setLocale(locale);
> > format.applyPattern(pattern);
> > messageFormats.put(key, format);
> > }
> > }
> >
> > return format;
> > }
> >
> >
> >
> > So my question is, has anyone attempted to upgrade the xWork library
> > to a later version in Struts 2.0.1.1? And if so, what version did you
> > use and what was your experience?
> >
> > Thank you in advance!
> > Ken
> >
> >
> >
> > -----------------------------------------
> > ***Note:The information contained in this message may be privileged
> > and confidential and protected from disclosure. If the reader of this
> > message is not the intended recipient, or an employee or agent
> > responsible for delivering this message to the intended recipient, you
> > are hereby notified that any dissemination, distribution or copying of
> > this communication is strictly prohibited. If you have received this
> > communication in error, please notify the Sender immediately by
> > replying to the message and deleting it from your computer. Thank
> > you. Premier Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_201005.ezm (zipped)
i'm running xwork-2.1.4
private static final Map<MessageFormatKey, MessageFormat> messageFormats = new HashMap<MessageFormatKey, MessageFormat>();
private static MessageFormat buildMessageFormat(String pattern, Locale locale)
{
MessageFormatKey key = new MessageFormatKey(pattern, locale);
MessageFormat format = null;
synchronized (messageFormats)
{
format = (MessageFormat) messageFormats.get(key);
if (format == null) {
format = new MessageFormat(pattern);
format.setLocale(locale);
format.applyPattern(pattern);
messageFormats.put(key, format);
}
}
return format;
}
//same as your latest version
can you display the synchronisation errors from the log?
thanks,
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Wed, 22 Jul 2009 13:39:02 -0700
> Subject: Re: Upgrading xWork??
> From: thechrispratt@(protected)
> To: user@(protected)
>
> I'd still suggest making your changes to the 2.0.5 source, since it most
> likely has other bug fixes that you just haven't needed yet.
> (*Chris*)
>
> On Wed, Jul 22, 2009 at 1:21 PM, Hoying, Ken <Ken_Hoying@(protected):
>
> > I checked and it was not. Thank you though. It only seems to appear in
> > the 2.1.x versions.
> >
> > -----Original Message-----
> > From: Chris Pratt [mailto:thechrispratt@(protected)]
> > Sent: Wednesday, July 22, 2009 4:08 PM
> > To: Struts Users Mailing List
> > Subject: Re: Upgrading xWork??
> >
> > If I remember correctly there was a 2.0.5 that was probably compatible with
> > the 2.0.x versions of Struts 2, but I have no idea if that fix is in that
> > version.
> > (*Chris*)
> >
> >
> > On Wed, Jul 22, 2009 at 9:47 AM, Hoying, Ken <Ken_Hoying@(protected)
> > >wrote:
> >
> > > We are running with Struts 2.0.1.1 (which uses xWork 2.0.4) and are
> > > noticing that we are getting hung threads sometimes on a HashMap call
> > > from com.opensymphony.xwork2.util.LocalizedTextUtil.
> > >
> > > It looks like the xWork code is question needs to be synchronized and
> > > is causing the threads to lock due to corruption in the HashMap. The
> > > problem code from xWork 2.0.4 is:
> > >
> > > private static MessageFormat buildMessageFormat(String pattern, Locale
> > > locale) {
> > > MessageFormatKey key = new MessageFormatKey(pattern, locale);
> > > MessageFormat format = (MessageFormat) messageFormats.get(key);
> > > if (format == null) {
> > > format = new MessageFormat(pattern);
> > > format.setLocale(locale);
> > > format.applyPattern(pattern);
> > > messageFormats.put(key, format);
> > > }
> > >
> > > return format;
> > > }
> > >
> > > I noticed that in later version of xWork this appears to have been
> > > fixed by the following change:
> > >
> > > private static MessageFormat buildMessageFormat(String pattern, Locale
> > > locale) {
> > > MessageFormatKey key = new MessageFormatKey(pattern, locale);
> > > MessageFormat format = null;
> > > synchronized(messageFormats) {
> > > format = (MessageFormat) messageFormats.get(key);
> > > if (format == null) {
> > > format = new MessageFormat(pattern);
> > > format.setLocale(locale);
> > > format.applyPattern(pattern);
> > > messageFormats.put(key, format);
> > > }
> > > }
> > >
> > > return format;
> > > }
> > >
> > >
> > >
> > > So my question is, has anyone attempted to upgrade the xWork library
> > > to a later version in Struts 2.0.1.1? And if so, what version did you
> > > use and what was your experience?
> > >
> > > Thank you in advance!
> > > Ken
> > >
> > >
> > >
> > > -----------------------------------------
> > > ***Note:The information contained in this message may be privileged
> > > and confidential and protected from disclosure. If the reader of this
> > > message is not the intended recipient, or an employee or agent
> > > responsible for delivering this message to the intended recipient, you
> > > are hereby notified that any dissemination, distribution or copying of
> > > this communication is strictly prohibited. If you have received this
> > > communication in error, please notify the Sender immediately by
> > > replying to the message and deleting it from your computer. Thank
> > > you. Premier Inc.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
_________________________________________________________________
Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics. Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009&cat=sports

Attachment:
user_200991.ezm (zipped)UNCLASSIFIED////
I have a portlet that is currently working other than the Spring Beans
are not injected.
I have the struts2-spring-plugin in the project. I have the spring
listener in my web.xml
Is there a setting that I am missing?
Timothy D. Ginn, Contractor
Web Developer
United States Army Accessions Command
EDS, an HP Company
(502)626-2028
(502)619-3315
Timothy.Ginn@(protected)
UNCLASSIFIED////

Attachment:
user_200993.ezm (zipped)There are lots of settings...
http://struts.apache.org/2.x/docs/spring-plugin.html
First off, are you configuring your actions as beans? Are you using
spring's autowiring? Do you see any diagnostic messages in the logs
when your app starts up?
-Wes
On Tue, Jul 21, 2009 at 11:44 AM, Ginn, Timothy D Mr CTR USA TRADOC
USAAC<TIMOTHY.GINN@(protected):
> UNCLASSIFIED////
>
>
> I have a portlet that is currently working other than the Spring Beans
> are not injected.
>
> I have the struts2-spring-plugin in the project. I have the spring
> listener in my web.xml
>
>
> Is there a setting that I am missing?
>
>
>
> Timothy D. Ginn, Contractor
> Web Developer
> United States Army Accessions Command
> EDS, an HP Company
> (502)626-2028
> (502)619-3315
> Timothy.Ginn@(protected)
>
>
>
> UNCLASSIFIED////
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

Attachment:
user_200992.ezm (zipped)I'm using S2 for an eCommerce application (with resource files in different languages) and I'd like to display the currency in US only. The problem, when someone using the 'fr' locale comes to the site, the price is displayed as 89,99 instead of 89.99. Is there a way to force it to display as '89.99'? My setup is below.
item.price={0,number,currency}
<s:text name="item.price"> <s:param value="product.cost" />
</s:text>
Thanks in advance for any help.

Attachment:
user_200997.ezm (zipped)Hello,
According to the XWork feature description,
http://www.opensymphony.com/xwork/wikidocs/XWork%20Features.html, the
ActionInvocation represents the execution state of an action holding
the action instance and the interceptors.
I have been looking at
http://struts.apache.org/2.1.6/struts2-core/apidocs and examining an
implementation of the ActionInvocation interface:
DefaultActionInvocation and was wondering how does this class gets a
hold of the action instance and the interceptors? It has relevant
fields like action, interceptors and proxy with getters for the action
and the proxy. But it is not straightforward to me how the action
instance (and the interceptors) are injected to it.. I didn't see
setter methods for the action.
My motivation for this question comes also from wanting to unit test
an interceptor's intercept(ActionInvocation actionInvocation) method.
I will need to pass an ActionInvocation as a parameter, which then the
interceptor will use to extract the actual action instance from.
(Among other things, like the InvocationContext to get the session).
So I was also wondering how to provide a mock-type of an
ActionInvocation which will contain a mock action, a mock session etc.
I mean I understand how to create a mock action and a mock session map
with some parameters in it, but how do I bind those to a mock
ActionInvocation? Would I need perhaps to start with a mock
ActionProxy?
Thanks for your advice. This will help me design the test case and
also learn more about the struts2 mechanics.
Regards!

Attachment:
user_200999.ezm (zipped)The best way to find out all these things is to put breakpoints in the
constructor and/or the setter methods.
musachy
On Wed, Jul 22, 2009 at 2:05 PM, Dimitrios
Christodoulakis<dimi.chr@(protected):
> Hello,
>
> According to the XWork feature description,
> http://www.opensymphony.com/xwork/wikidocs/XWork%20Features.html, the
> ActionInvocation represents the execution state of an action holding
> the action instance and the interceptors.
>
> I have been looking at
> http://struts.apache.org/2.1.6/struts2-core/apidocs and examining an
> implementation of the ActionInvocation interface:
> DefaultActionInvocation and was wondering how does this class gets a
> hold of the action instance and the interceptors? It has relevant
> fields like action, interceptors and proxy with getters for the action
> and the proxy. But it is not straightforward to me how the action
> instance (and the interceptors) are injected to it.. I didn't see
> setter methods for the action.
>
> My motivation for this question comes also from wanting to unit test
> an interceptor's intercept(ActionInvocation actionInvocation) method.
> I will need to pass an ActionInvocation as a parameter, which then the
> interceptor will use to extract the actual action instance from.
> (Among other things, like the InvocationContext to get the session).
>
> So I was also wondering how to provide a mock-type of an
> ActionInvocation which will contain a mock action, a mock session etc.
> I mean I understand how to create a mock action and a mock session map
> with some parameters in it, but how do I bind those to a mock
> ActionInvocation? Would I need perhaps to start with a mock
> ActionProxy?
>
> Thanks for your advice. This will help me design the test case and
> also learn more about the struts2 mechanics.
> Regards!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_201000.ezm (zipped)Yes, I figured doing a trace and see how things happen would answer a
lot of questions. So, I'll try that.
From looking at the DefaultActionProxy constructor, it does make sense
to start with the actionproxy. The proxy gets an action invocation as
a constructor parameter. So the invocation instantiation should be
coming shortly after that.
On Wed, Jul 22, 2009 at 4:17 PM, Musachy Barroso<musachy@(protected):
> The best way to find out all these things is to put breakpoints in the
> constructor and/or the setter methods.
>
> musachy
>
> On Wed, Jul 22, 2009 at 2:05 PM, Dimitrios
> Christodoulakis<dimi.chr@(protected):
>> Hello,
>>
>> According to the XWork feature description,
>> http://www.opensymphony.com/xwork/wikidocs/XWork%20Features.html, the
>> ActionInvocation represents the execution state of an action holding
>> the action instance and the interceptors.
>>
>> I have been looking at
>> http://struts.apache.org/2.1.6/struts2-core/apidocs and examining an
>> implementation of the ActionInvocation interface:
>> DefaultActionInvocation and was wondering how does this class gets a
>> hold of the action instance and the interceptors? It has relevant
>> fields like action, interceptors and proxy with getters for the action
>> and the proxy. But it is not straightforward to me how the action
>> instance (and the interceptors) are injected to it.. I didn't see
>> setter methods for the action.
>>
>> My motivation for this question comes also from wanting to unit test
>> an interceptor's intercept(ActionInvocation actionInvocation) method.
>> I will need to pass an ActionInvocation as a parameter, which then the
>> interceptor will use to extract the actual action instance from.
>> (Among other things, like the InvocationContext to get the session).
>>
>> So I was also wondering how to provide a mock-type of an
>> ActionInvocation which will contain a mock action, a mock session etc.
>> I mean I understand how to create a mock action and a mock session map
>> with some parameters in it, but how do I bind those to a mock
>> ActionInvocation? Would I need perhaps to start with a mock
>> ActionProxy?
>>
>> Thanks for your advice. This will help me design the test case and
>> also learn more about the struts2 mechanics.
>> Regards!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_201006.ezm (zipped)
does vi have breakpoints.. am i missing something?
if you need to run this outside of an ide either use Logger.debug(variable);
http://www.oracle.com/technology/products/jdev/tips/mills/Struts-logging.html
or debug
before craig and ted left (i wished they both stayed but thats another topic)
a DebuggingInterceptor was coded and is activated by
struts.devMode = true
http://struts.apache.org/2.0.14/docs/debugging.html
then address would contain ?debug=<parameter> in url should specifies either
?debug=xml or ?debug=console to the URL.
HTH
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Wed, 22 Jul 2009 14:17:50 -0700
> Subject: Re: studying struts2 framework, ActionInvocation question
> From: musachy@(protected)
> To: user@(protected)
>
> The best way to find out all these things is to put breakpoints in the
> constructor and/or the setter methods.
>
> musachy
>
> On Wed, Jul 22, 2009 at 2:05 PM, Dimitrios
> Christodoulakis<dimi.chr@(protected):
> > Hello,
> >
> > According to the XWork feature description,
> > http://www.opensymphony.com/xwork/wikidocs/XWork%20Features.html, the
> > ActionInvocation represents the execution state of an action holding
> > the action instance and the interceptors.
> >
> > I have been looking at
> > http://struts.apache.org/2.1.6/struts2-core/apidocs and examining an
> > implementation of the ActionInvocation interface:
> > DefaultActionInvocation and was wondering how does this class gets a
> > hold of the action instance and the interceptors? It has relevant
> > fields like action, interceptors and proxy with getters for the action
> > and the proxy. But it is not straightforward to me how the action
> > instance (and the interceptors) are injected to it.. I didn't see
> > setter methods for the action.
> >
> > My motivation for this question comes also from wanting to unit test
> > an interceptor's intercept(ActionInvocation actionInvocation) method.
> > I will need to pass an ActionInvocation as a parameter, which then the
> > interceptor will use to extract the actual action instance from.
> > (Among other things, like the InvocationContext to get the session).
> >
> > So I was also wondering how to provide a mock-type of an
> > ActionInvocation which will contain a mock action, a mock session etc.
> > I mean I understand how to create a mock action and a mock session map
> > with some parameters in it, but how do I bind those to a mock
> > ActionInvocation? Would I need perhaps to start with a mock
> > ActionProxy?
> >
> > Thanks for your advice. This will help me design the test case and
> > also learn more about the struts2 mechanics.
> > Regards!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Bing™ brings you maps, menus, and reviews organized in one place. Try it now.
http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TXT_MLOGEN_Local_Local_Restaurants_1x1

Attachment:
user_200998.ezm (zipped)Sam Wun wrote:
> I got the followiong error when I tried to compile it with Ant:
>
> # ant
> Buildfile: build.xml
>
> compile:
> [javac] Compiling 2 source files to
> /usr/liferay-portal-5.2.3/dev/portlets/sample-datagrid/docroot/WEB-INF/classes
> [javac] /usr/liferay-portal-5.2.3/dev/portlets/sample-datagrid/docroot/WEB-INF/src/com/ip6networks/datagrid/portlet/DatagridAction.java:28:
> package fr.improve.struts.taglib.layout.datagrid does not exist
> [javac] import fr.improve.struts.taglib.layout.datagrid.Datagrid;
>
>
> The Struts-Layout jar file is already put in place in the lib folder:
> # pwd
> /usr/liferay-portal-5.2.3/dev/portlets/sample-datagrid/docroot/WEB-INF/lib
> lib # ls
> ./ ../ Struts-Layout-1.3.jar
>
> Very appreciate for any suggestion.
I'd suggest talking to the struts-layout folks--it's not part of Struts.
Dave

Attachment:
user_201001.ezm (zipped)Hi folks,
I'm having some issues with the ".action" suffix with respect to my
integration testing. When we are in development, we typically run our
application using the Maven Jetty plugin. It works great for us. In
this environment, there are no ".action" suffixes on our action
mappings. However, when we build and deploy the application as a WAR,
it goes into a Tomcat 5 container. In this environment, the action
mappings all have ".action" on them. Of course, this kills our
integration tests that rely on finding things by way of the action
reference (xpath).
How can I control this so that I do not get ".action" on my URLs?
Thanks,
Dave

Attachment:
user_201002.ezm (zipped)Hi David,
try to set following property
struts.action.extension=,,
in struts.properties which suppress generating of the suffix for your
actions.
Martin
David C. Hicks wrote:
> Hi folks,
>
> I'm having some issues with the ".action" suffix with respect to my
> integration testing. When we are in development, we typically run our
> application using the Maven Jetty plugin. It works great for us. In
> this environment, there are no ".action" suffixes on our action
> mappings. However, when we build and deploy the application as a WAR,
> it goes into a Tomcat 5 container. In this environment, the action
> mappings all have ".action" on them. Of course, this kills our
> integration tests that rely on finding things by way of the action
> reference (xpath).
>
> How can I control this so that I do not get ".action" on my URLs?
>
> Thanks,
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

Attachment:
user_201003.ezm (zipped)On Wed, Jul 22, 2009 at 3:20 PM, Martin Uhlir<stoupa91devel@(protected):
> struts.action.extension=,,
> in struts.properties which suppress generating of the suffix for your
> actions.
I wrote like 2 paragraphs just to say that :), good thing I didn't send it.
musachy
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_201004.ezm (zipped)Thanks for the input, guys. It appears to work fine on my development
box. I'm re-running my automated build/test cycle to see what happens
when it gets deployed to Tomcat.
Much appreciated!
Dave
Musachy Barroso wrote:
> On Wed, Jul 22, 2009 at 3:20 PM, Martin Uhlir<stoupa91devel@(protected):
>
>> struts.action.extension=,,
>> in struts.properties which suppress generating of the suffix for your
>> actions.
>>
>
> I wrote like 2 paragraphs just to say that :), good thing I didn't send it.
>
> musachy
>
>