Re: Problem with xwork convertor

2009-07-22 Thread spsarolkar

I am facing the same problem 
When i use struts2 SNAPSHOT version i get error as
No converter defined
And i fails to compile


Ikya wrote:
> 
> Thanks. It worked.
> 
> Regards,
> Sreekanth
> 
> On Wed, May 20, 2009 at 11:22 AM, Wes Wannemacher  wrote:
> 
>> It might be easier to grab the most recent snapshot builds from here -
>>
>> http://people.apache.org/builds/struts/nightlies/2.x/
>>
>> Give them a try, they should include all of the appropriate dependencies.
>>
>> -Wes
>>
>> On Wednesday 20 May 2009 01:45:12 am Ikya Technical wrote:
>> > Hi All,
>> >
>> > We are working on a Struts 2 project. We are facing a problem
>> whenever
>> > there is Double type field with Model class and field value is zero
>> then
>> it
>> > is throwing some error. After searching a lot we find out that the
>> issue
>> is
>> > with xwork2 and it is already reported and fixed. The issue comes with
>> > xwork-2.1.2.jar and in the http://jira.opensymphony.com/browse/XW-676 ,
>> it
>> > stating that issue is fixed with latest jar xwork-2.1.3.jar
>> >
>> >But we are getting some strage errors when we replaced the xwork jar
>> > file with latest version. We haven't changed any othe library. The
>> other
>> > major libraries we are using are struts2-core-2.1.6.jar
>> > xstream-1.2.2.jar
>> > ognl-2.6.11.jar
>> > oro-2.0.8.jar
>> > The exception thrown is :
>> >
>> > om.opensymphony.xwork2.inject.DependencyException:
>> >
>> com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
>> No
>> > mapping found for dependency [type=java.lang.String,
>> > name='logMissingProperties'] in public void
>> > com.opensymphony.xwork2.ognl.OgnlValueStack.setLogMissingProperties(
>> java.la
>> >ng.String).
>> >
>> > at
>> >
>> com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(Contain
>> >erImpl.java:144)
>> >
>> > at
>> >
>> com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(Contain
>> >erImpl.java:113)
>> >
>> > at
>> >
>> com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.jav
>> >a:90)
>> >
>> >
>> > Please help it out.
>> >
>> > Thanks in advance,
>> > Sreekanth
>>
>> --
>>
>> Wes Wannemacher
>> Author - Struts 2 In Practice
>> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
>> http://www.manning.com/wannemacher
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-xwork-convertor-tp23629355p24619651.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: s2 currency and internationalization

2009-07-22 Thread kaphilmore
FIXED. If you're trying to sell a product in US dollars and you're selling 
internationally, use something similar to this in your resource file. I hope 
this helps someone, because it drove me crazy for a day!!




format.money = $ {0,number,#.00}


--- In str...@yahoogroups.com, "kaphilmore"  wrote:
>
> 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}
>
>  value="product.cost" />
> 
>
> Thanks in advance for any help.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@...
> For additional commands, e-mail: user-h...@...
>



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Musachy Barroso
an easier way, is to install the maven plugin for eclipse, and then
checkout the struts 2 code, and import apps/blank/pom.xml as a maven
project. Then you can run and debug it from eclipse without having to
download any code.

musachy

On Wed, Jul 22, 2009 at 6:23 PM, Dimitrios
Christodoulakis wrote:
> Thanks Dave and Martin. I learn something new every time!
>
> I was able to attach the source to struts2-core-2.1.6.jar and
> xwork-2.1.2.jar by first downloading the source code and pointing to
> the it from within eclipse.
>
> project->right click->properties->Java build path->Libraries->select
> jar->Source Attachment->edit
>
> I will try the breakpoint next. I hope eclipse can trace a breakpoint
> all the way to at least classes within those jars. Attaching code to
> each and every jar in the project sounds a bit tedious. I mean I
> manually downloaded the source and attached it. So for all other jars,
> spring, hibernate, commons, etc -- should take a long time. Unless it
> could be done automatically by eclipse, but I am not sure. Probably
> not
>
> On Wed, Jul 22, 2009 at 8:11 PM, Martin Gainty wrote:
>>
>> unless someone redesigned Eclipse breakpoint wont be able to see a class 
>> packaged in the jar *at least with ganymede*
>> stick with debug algorithm's mentioned earlier
>> (main focus would be to debug action initialisation as dave mentioned)
>> ...
>> 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 19:49:23 -0500
>>> Subject: Re: studying struts2 framework, ActionInvocation question
>>> From: dimi@gmail.com
>>> To: user@struts.apache.org
>>>
>>> Dave Newton wrote:
>>> >
>>> > Won't help track action invocation initialization, methinks.
>>> >
>>>
>>> Is there a particular way you would recommend to go about doing it
>>> actually? I am using eclipse for my ide, but I am not sure if
>>> breakpoints can trace through the compiled classes in the jars.
>>>
>>> Much appreciate the advice.
>>>
>>> On Wed, Jul 22, 2009 at 7:44 PM, Dave Newton wrote:
>>> > Martin Gainty wrote:
>>> >>
>>> >> does vi have breakpoints.. am i missing something?
>>> >
>>> > 
>>> >
>>> > In this case you actually saw something nobody else did--a vi reference.
>>> >
>>> >> 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= in url should specifies
>>> >> either
>>> >> ?debug=xml or ?debug=console to the URL.
>>> >
>>> > Won't help track action invocation initialization, methinks.
>>> >
>>> > Dave
>>> >
>>> > -
>>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> > For additional commands, e-mail: user-h...@struts.apache.org
>>> >
>>> >
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>
>> _
>> 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
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dimitrios Christodoulakis
Thanks Dave and Martin. I learn something new every time!

I was able to attach the source to struts2-core-2.1.6.jar and
xwork-2.1.2.jar by first downloading the source code and pointing to
the it from within eclipse.

project->right click->properties->Java build path->Libraries->select
jar->Source Attachment->edit

I will try the breakpoint next. I hope eclipse can trace a breakpoint
all the way to at least classes within those jars. Attaching code to
each and every jar in the project sounds a bit tedious. I mean I
manually downloaded the source and attached it. So for all other jars,
spring, hibernate, commons, etc -- should take a long time. Unless it
could be done automatically by eclipse, but I am not sure. Probably
not

On Wed, Jul 22, 2009 at 8:11 PM, Martin Gainty wrote:
>
> unless someone redesigned Eclipse breakpoint wont be able to see a class 
> packaged in the jar *at least with ganymede*
> stick with debug algorithm's mentioned earlier
> (main focus would be to debug action initialisation as dave mentioned)
> ...
> 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 19:49:23 -0500
>> Subject: Re: studying struts2 framework, ActionInvocation question
>> From: dimi@gmail.com
>> To: user@struts.apache.org
>>
>> Dave Newton wrote:
>> >
>> > Won't help track action invocation initialization, methinks.
>> >
>>
>> Is there a particular way you would recommend to go about doing it
>> actually? I am using eclipse for my ide, but I am not sure if
>> breakpoints can trace through the compiled classes in the jars.
>>
>> Much appreciate the advice.
>>
>> On Wed, Jul 22, 2009 at 7:44 PM, Dave Newton wrote:
>> > Martin Gainty wrote:
>> >>
>> >> does vi have breakpoints.. am i missing something?
>> >
>> > 
>> >
>> > In this case you actually saw something nobody else did--a vi reference.
>> >
>> >> 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= in url should specifies
>> >> either
>> >> ?debug=xml or ?debug=console to the URL.
>> >
>> > Won't help track action invocation initialization, methinks.
>> >
>> > Dave
>> >
>> > -
>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > For additional commands, e-mail: user-h...@struts.apache.org
>> >
>> >
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>
> _
> 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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Martin Gainty

unless someone redesigned Eclipse breakpoint wont be able to see a class 
packaged in the jar *at least with ganymede*
stick with debug algorithm's mentioned earlier
(main focus would be to debug action initialisation as dave mentioned)
...
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 19:49:23 -0500
> Subject: Re: studying struts2 framework, ActionInvocation question
> From: dimi@gmail.com
> To: user@struts.apache.org
> 
> Dave Newton wrote:
> >
> > Won't help track action invocation initialization, methinks.
> >
> 
> Is there a particular way you would recommend to go about doing it
> actually? I am using eclipse for my ide, but I am not sure if
> breakpoints can trace through the compiled classes in the jars.
> 
> Much appreciate the advice.
> 
> On Wed, Jul 22, 2009 at 7:44 PM, Dave Newton wrote:
> > Martin Gainty wrote:
> >>
> >> does vi have breakpoints.. am i missing something?
> >
> > 
> >
> > In this case you actually saw something nobody else did--a vi reference.
> >
> >> 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= in url should specifies
> >> either
> >> ?debug=xml or ?debug=console to the URL.
> >
> > Won't help track action invocation initialization, methinks.
> >
> > Dave
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_
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

Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dave Newton

Dimitrios Christodoulakis wrote:

Dave Newton wrote:

Won't help track action invocation initialization, methinks.



Is there a particular way you would recommend to go about doing it
actually? I am using eclipse for my ide, but I am not sure if
breakpoints can trace through the compiled classes in the jars.


You should be able to attach the source to the XW/S2 jars; IIRC if you 
right-click on the jar in the project view's "Referenced Libraries" thing.


Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dimitrios Christodoulakis
Dave Newton wrote:
>
> Won't help track action invocation initialization, methinks.
>

Is there a particular way you would recommend to go about doing it
actually? I am using eclipse for my ide, but I am not sure if
breakpoints can trace through the compiled classes in the jars.

Much appreciate the advice.

On Wed, Jul 22, 2009 at 7:44 PM, Dave Newton wrote:
> Martin Gainty wrote:
>>
>> does vi have breakpoints.. am i missing something?
>
> 
>
> In this case you actually saw something nobody else did--a vi reference.
>
>> 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= in url should specifies
>> either
>> ?debug=xml or ?debug=console to the URL.
>
> Won't help track action invocation initialization, methinks.
>
> Dave
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dave Newton

Martin Gainty wrote:

does vi have breakpoints.. am i missing something?




In this case you actually saw something nobody else did--a vi reference.


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= in url should specifies either
?debug=xml or ?debug=console to the URL.


Won't help track action invocation initialization, methinks.

Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Martin Gainty

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= 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: musa...@gmail.com
> To: user@struts.apache.org
> 
> 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 wrote:
> > 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-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_
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

RE: Upgrading xWork??

2009-07-22 Thread Martin Gainty

i'm running xwork-2.1.4

private static final Map messageFormats = new 
HashMap();
 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: thechrispr...@gmail.com
> To: user@struts.apache.org
> 
> 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 wrote:
> 
> > 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:thechrispr...@gmail.com]
> > 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  > >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 n

Re: .action suffix - how to control it?

2009-07-22 Thread David C. Hicks
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 wrote:
>   
>> 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
>
>   


Re: .action suffix - how to control it?

2009-07-22 Thread Musachy Barroso
On Wed, Jul 22, 2009 at 3:20 PM, Martin Uhlir wrote:
> 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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: .action suffix - how to control it?

2009-07-22 Thread Martin Uhlir

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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


  



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



.action suffix - how to control it?

2009-07-22 Thread David C. Hicks
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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dimitrios Christodoulakis
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 wrote:
> 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 wrote:
>> 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-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Musachy Barroso
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 wrote:
> 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-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to fix this error.

2009-07-22 Thread Dave Newton

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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dimitrios Christodoulakis
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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Upgrading xWork??

2009-07-22 Thread Chris Pratt
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 wrote:

> 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:thechrispr...@gmail.com]
> 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  >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-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


RE: Upgrading xWork??

2009-07-22 Thread Hoying, Ken
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:thechrispr...@gmail.com] 
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 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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Upgrading xWork??

2009-07-22 Thread Chris Pratt
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 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.


Re: [U] Struts2 Portlet with Spring

2009-07-22 Thread Wes Wannemacher
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 wrote:
> 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.g...@usaac.army.mil
>
>
>
> UNCLASSIFIED
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



s2 currency and internationalization

2009-07-22 Thread kaphilmore
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}

  


Thanks in advance for any help.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



[U] Struts2 Portlet with Spring

2009-07-22 Thread Ginn, Timothy D Mr CTR USA TRADOC USAAC
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.g...@usaac.army.mil



UNCLASSIFIED


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Upgrading xWork??

2009-07-22 Thread Hoying, Ken
Thanks, Wes.

That is our fallback plan and most likely the route we will take.

Thanks,
Ken 

-Original Message-
From: Wes Wannemacher [mailto:w...@wantii.com] 
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 wrote:
> On Today at 1:04pm, HK=>Hoying, Ken  wrote:
>
> 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
> 
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



--
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org 
-
***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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Upgrading xWork??

2009-07-22 Thread Hoying, Ken
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.rafi...@utoronto.ca] 
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  wrote:

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



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org 
-
***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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Upgrading xWork??

2009-07-22 Thread Wes Wannemacher
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 wrote:
> On Today at 1:04pm, HK=>Hoying, Ken  wrote:
>
> 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
> 
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Upgrading xWork??

2009-07-22 Thread Haroon Rafique
On Today at 1:04pm, HK=>Hoying, Ken  wrote:

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



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Upgrading xWork??

2009-07-22 Thread Hoying, Ken
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_hoy...@premierinc.com]
Sent: Wednesday, July 22, 2009 12:47 PM
To: user@struts.apache.org
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.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Upgrading xWork??

2009-07-22 Thread Hoying, Ken
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.

RE: Struts2 portlet bug found

2009-07-22 Thread Kofford, C Todd
Since this deals with struts and uportal I have copied the uportal user
group in this response too.

I had a similar problem. See email thread below:
http://www.mail-archive.com/user@struts.apache.org/msg87615.html 

I was simply using the session (map) object from a SessionAware action
class and not explicitly using PortletSession. This is because we run
our struts 2 webapp both as a portlet and a standalone webapp, and
wanted to handle the session in a consistent way. I applied the uportal
fix (mentioned in the email thread) to my uportal 2.5.x installation and
MY problem was solved. 

We are just now moving to uportal 3.1.1 and are still on struts 2.0.14
due to an issue running struts 2.1.6 webapps as standalone and portlet
simultaneously. But so far, I have not seen the problem you describe
when testing my struts 2 portlets in uportal 3.1.1. 

Todd Kofford
tkoff...@ku.edu
University of Kansas - IT

-Original Message-
From: Tracy12 [mailto:j_lal...@yahoo.com] 
Sent: Tuesday, July 21, 2009 8:49 PM
To: user@struts.apache.org
Subject: Struts2 portlet bug found


Hi,

We got a  struts 2.0.6 portlet application with uPortal  2.5.3 ( inside
Pluto 1.0.x) with no issues and running fine.

Now we deployed the same struts 2.0.6 application in uPortal 3.1.1
(inside
pluto 1.1.7) and found following issue.

in our action classes we had the following,  where session is of type
PortletSession.

session.setAttribute("studentId","111",PortletSession.APPLICATION_SC
OPE)

We trieved the above studentId in the jsp as follows. 


The above worked with no issues in uPortal 2.5.3 but with uPortal 3.1.1
this
is not working,
Then I tried the following
 but didnt work,


I  interacted with the uPortal forum and this is what it
tells...http://www.nabble.com/Re%3A-is-this-a-bug-in-struts2-portlets-td
24581733.html 

I thought based on that 
should
work,

What else could I try, This looks to me a bug. Can't understand why it
is
not in the value stack.

If not pls let me know how to retrieve the above
PortletSession.APPLICATION_SCOPE variable in the jsp.

If this has been fixed let me know which struts 2 version is that.


I did try the following also with no luck



waiting for a quick reply


Thanks





-- 
View this message in context:
http://www.nabble.com/Struts2-portlet-bug-found-tp24598748p24598748.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Redirecting to servlet

2009-07-22 Thread Wes Wannemacher
I think you can set the constant - struts.action.excludePattern to a
pattern that will match your servlet, then the dispatcher filter in
use should ignore it. You can specify a comma-separated list of
patterns for the dispatcher to ignore.

-Wes

On Tue, Jul 21, 2009 at 11:53 PM, Kavita Mehta wrote:
> Hi,
> I have an application in struts2.0 . I want a servlet in it to cater to a
> specific HTTP request. How can I make sure that the request to servlet
> does not go through struts.xml as it searches for the action class with
> the same name.
>
>
>
> thanks,
> Kavita
>
>
>
>
> *DISCLAIMER*
>
> This message and/or attachment(s) contained here are confidential, 
> proprietary to HUGHES SYSTIQUE and its customers.
> Contents may be privileged or otherwise protected by law. The information is 
> solely intended for the entity it is
> addressed to. If you are not the intended recipient of this message, it is 
> strictly prohibited to read, forward,
> print, retain, copy or disseminate this message or any part of it. If you 
> have received this e-mail in error,
> please notify the sender immediately and delete the message.
>
> 
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: help: struts2 validators doesn't work in java 1.6

2009-07-22 Thread Wes Wannemacher
Validation works fine for me... From looking at the exception, I would
guess that your validation file has unparseable XML. Can you post some
more information? We'll help you sort it out.

-Wes

On Wed, Jul 22, 2009 at 1:55 AM, gwen harold
autencio wrote:
> Hi
>
>
>
> Any workaround on validation of struts2 to work using java1.6 ?
>
> Seems to work using java 1.5..
>
> version : struts2-core-2.0.11.2
>
>
>
> Getting Error 500 in page
>
>
>
> java.lang.ExceptionInInitializerError
>
>     at 
> com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs(ValidatorFileParser.java:192)
>
>     at 
> com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs(ValidatorFileParser.java:72)
>
>     at 
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:361)
>
>
> at
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(AnnotationActionValidatorManager.java:252)
>
>
> at
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:340)
>
>
> at
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:69)
>
>     at 
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:138)
>
>     at 
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:113)
>
>     at 
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:100)
>
>     at 
> com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:142)
>
>     at
>  com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:148)
>
>
> at
> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
>
>     at 
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>
>     at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
>
>     at
>  com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>
>     at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
>
>     at 
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:186)
>
>     at 
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
>
>     at
>  com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>
>     at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
>
>     at 
> com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>
>     at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>
>     at
>  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
>
>     at 
> org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
>
>     at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>
>     at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
>
>     at 
> org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:268)
>
>     a

How to fix this error.

2009-07-22 Thread Sam Wun
Hi,

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.

Thanks
Sam

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Exception though the result looks as expected

2009-07-22 Thread Lukasz Lenart
2009/7/18 mathias-ewald :
>                float average =
> (Float)ActionContext.getContext().getValueStack().findValue("#average");

This can be an issue - autoboxing ;-)


Regards
-- 
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/

Ted Turner  - "Sports is like a war without the killing." -
http://www.brainyquote.com/quotes/authors/t/ted_turner.html

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: struts 2.1.5 type conversion error

2009-07-22 Thread Lukasz Lenart
2009/7/17  :
> 
> Name nl
> price
> 

What type has "price" in action class?


Regards
-- 
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/

Charles de Gaulle  - "The better I get to know men, the more I find
myself loving dogs." -
http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org