Author Login
Post Reply
user Digest 3 Jun 2008 02:32:52 -0000 Issue 8067
Topics (messages 187134 through 187158):
Re: [Struts 2] Set action parameter - simple
187134 by: Milan Milanovic
187136 by: Lukasz Lenart
187137 by: Milan Milanovic
187143 by: Musachy Barroso
187145 by: Lukasz Lenart
187146 by: Milan Milanovic
187147 by: Musachy Barroso
Re: Action-Redirect Parameter Problem
187135 by: Mark Lester
187139 by: Adam Hardy
187141 by: Musachy Barroso
187142 by: Musachy Barroso
187155 by: Adam Hardy
187156 by: Musachy Barroso
newbie issue - tiles plugin, adding content to "dynamic" attributes
187138 by: Markus L.
Problem generating a csv file for download
187140 by: Jan Froehlich
187150 by: Dave Newton
187153 by: Jan Froehlich
fieldError tag
187144 by: David Evans
187152 by: Felipe Lorenz
187154 by: David Evans
Re: Struts2 can't populate array property to form beans
187148 by: Laurie Harper
187157 by: l4kyl4ky.gmail.com
187158 by: l4kyl4ky.gmail.com
Re: JCAPTCHA
187149 by: Laurie Harper
Re: Struts2, Uncodage / Charset=ISO-8859-1
187151 by: Laurie Harper
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_187134.ezm (zipped)To explain better, it looks like this "edit" method is called three times, but just the middle one have a correct value ?
Milan Milanovic <milanmilanovich@(protected),
I have a little problem with setting this value now. Regarding this piece of code:
Edit ${id}
when user clicks on this URL in method edit() output log is this, for
example when value is 2:
currentPage: 0
currentPage: 2
currentPage: 0
?
Lukasz Lenart wrote: Solution
Edit ${id}
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_187136.ezm (zipped)Hi,
Mainly it is a problem with JavaScript, Ajax or maybe TabbedPanel. Are you
using one of this with connection to generated links?
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_187137.ezm (zipped)Yes, I'm actually creating this link like this:
<s:a href="%{url}" theme="ajax" notifyTopics="/refresh"><s:property/></s:a>
Lukasz Lenart <lukasz.lenart@(protected),
Mainly it is a problem with JavaScript, Ajax or maybe TabbedPanel. Are you
using one of this with connection to generated links?
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_187143.ezm (zipped)NotifyTopics are triggered 2 times, one before the request is done,
and one after. There multiple examples in showcase and this list on
how to do it. In 2.1 there are separate topics for the events, so no
JS is necessary.
musachy
On Mon, Jun 2, 2008 at 12:47 PM, Milan Milanovic
<milanmilanovich@(protected):
> Yes, I'm actually creating this link like this:
>
> <s:a href="%{url}" theme="ajax" notifyTopics="/refresh"><s:property/></s:a>
>
> Lukasz Lenart <lukasz.lenart@(protected),
>
> Mainly it is a problem with JavaScript, Ajax or maybe TabbedPanel. Are you
> using one of this with connection to generated links?
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_187145.ezm (zipped)Hi,
I have no experience with Ajax tags in Struts2 so I can't help you.
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_187146.ezm (zipped)Hi Musachy,
yes, I understand. I don't want it. Could you give me any hint or a link to the solution ?
--
Thx in advance, Milan
Musachy Barroso <musachy@(protected),
and one after. There multiple examples in showcase and this list on
how to do it. In 2.1 there are separate topics for the events, so no
JS is necessary.
musachy
On Mon, Jun 2, 2008 at 12:47 PM, Milan Milanovic
wrote:
> Yes, I'm actually creating this link like this:
>
>
>
> Lukasz Lenart wrote: Hi,
>
> Mainly it is a problem with JavaScript, Ajax or maybe TabbedPanel. Are you
> using one of this with connection to generated links?
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
>
>
--
"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_187147.ezm (zipped)Showcase (ajax tags section), and search this list for "notifyTopics"
musachy
On Mon, Jun 2, 2008 at 4:16 PM, Milan Milanovic
<milanmilanovich@(protected):
> Hi Musachy,
>
> yes, I understand. I don't want it. Could you give me any hint or a link to the solution ?
>
> --
> Thx in advance, Milan
>
> Musachy Barroso <musachy@(protected),
> and one after. There multiple examples in showcase and this list on
> how to do it. In 2.1 there are separate topics for the events, so no
> JS is necessary.
>
> musachy
>
> On Mon, Jun 2, 2008 at 12:47 PM, Milan Milanovic
> wrote:
>> Yes, I'm actually creating this link like this:
>>
>>
>>
>> Lukasz Lenart wrote: Hi,
>>
>> Mainly it is a problem with JavaScript, Ajax or maybe TabbedPanel. Are you
>> using one of this with connection to generated links?
>>
>>
>> Regards
>> --
>> Lukasz
>> http://www.lenart.org.pl/
>>
>>
>>
>
>
>
> --
> "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)
>
>
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_187135.ezm (zipped)Yeah it sets the parameter for me too it just throws the exception
which I a bit of an annoyance and wondering how to make it not throw
that exception
-----Original Message-----
From: Adam Hardy [mailto:ahardy.struts@(protected)]
Sent: Monday, June 02, 2008 8:43 AM
To: Struts Users Mailing List
Subject: Re: Action-Redirect Parameter Problem
I had a look at the code and I can see why it throws an exception at
that point,
but despite that, my experience is that it works - it does set the
parameter on
my Result.
Mark Lester on 02/06/08 13:08, wrote:
> Yeah I am still having problems with it.
>
> -----Original Message-----
> From: Adam Hardy [mailto:ahardy.struts@(protected)]
> Sent: Sunday, June 01, 2008 2:52 PM
> To: Struts Users Mailing List
> Subject: Re: Action-Redirect Parameter Problem
>
> That issue is closed, although there is a comment left after it was
> closed
> suggesting that the issue is still a problem and that the bug should
> be re-opened.
>
> I see this 'warning' from OGNL wherever I use Action-Redirect
results
> with the
> latest struts2 version, and it's true that the stacktrace in the
> webserver log
> is distracting, but I don't find any problems with it like the last
> comment
> suggests.
>
> It's not clear why the poster of that comment didn't re-open the bug
> or create a
> new one if there is a real problem there.
>
> Do you find problems with it still?
>
> It seems to me that the issue should not have been changed from
status
> open to
> resolved, rather it should have been changed from priority major to
> enhancement.
>
> Also the poster of the last comment should have left more details
with
> perhaps a
> patch or unit-test displaying his/her bug.
>
>
> Adam
>
>
> Mark Lester on 30/05/08 14:31, wrote:
>> Thanks for the quick response. I don't think that is the problem
>> because that directory is already clear plus I have only used the
>> current version of struts2
>>
>> -----Original Message-----
>> From: Owen Berry [mailto:owen.berry@(protected)]
>> Sent: Friday, May 30, 2008 9:24 AM
>> To: Struts Users Mailing List
>> Subject: Re: Action-Redirect Parameter Problem
>>
>> If you're using Maven, you should try clearing out your local Maven
>> repository (rm -rf ~/.m2/repository) and try again ... I've had a
> few
>> cases where I seemed to be using old versions of jars until I did
>> this.
>>
>> On Fri, May 30, 2008 at 9:18 AM, Mark Lester
<MarkL@(protected)>
>> wrote:
>>> I followed the
>>> http://struts.apache.org/2.x/docs/redirect-action-result.html To
>> pass
>>> parameters to an action
>>>
>>> And it generates the exception
>>>
>>> Caught OgnlException while setting property 'navigation' on type
>>> '
org.apache.struts2.dispatcher.ServletActionRedirectResult'.
>>>
>>>
>>>
>>> I looked the Exception up and I found a bug report for struts 2 at
>>>
>>> http://issues.apache.org/struts/browse/WW-1714
>>>
>>>
>>>
>>> The problem is that it says the issue is resolved as of version
> 2.08
>>> but I am using 2.11 and I am still getting the warning.
>>>
>>> Information regarding this issue would be very helpful.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_187139.ezm (zipped)Only solution is a code change where it is logged.
As I said earlier in the thread, I think that closed bug report should be
re-opened or cloned and set to Enhancement.
Mark Lester on 02/06/08 17:42, wrote:
> Yeah it sets the parameter for me too it just throws the exception
> which I a bit of an annoyance and wondering how to make it not throw
> that exception
>
> -----Original Message-----
> From: Adam Hardy [mailto:ahardy.struts@(protected)]
> Sent: Monday, June 02, 2008 8:43 AM
> To: Struts Users Mailing List
> Subject: Re: Action-Redirect Parameter Problem
>
> I had a look at the code and I can see why it throws an exception at
> that point,
> but despite that, my experience is that it works - it does set the
> parameter on
> my Result.
>
> Mark Lester on 02/06/08 13:08, wrote:
>> Yeah I am still having problems with it.
>>
>> -----Original Message-----
>> From: Adam Hardy [mailto:ahardy.struts@(protected)]
>> Sent: Sunday, June 01, 2008 2:52 PM
>> To: Struts Users Mailing List
>> Subject: Re: Action-Redirect Parameter Problem
>>
>> That issue is closed, although there is a comment left after it was
>> closed
>> suggesting that the issue is still a problem and that the bug should
>> be re-opened.
>>
>> I see this 'warning' from OGNL wherever I use Action-Redirect
> results
>> with the
>> latest struts2 version, and it's true that the stacktrace in the
>> webserver log
>> is distracting, but I don't find any problems with it like the last
>> comment
>> suggests.
>>
>> It's not clear why the poster of that comment didn't re-open the bug
>> or create a
>> new one if there is a real problem there.
>>
>> Do you find problems with it still?
>>
>> It seems to me that the issue should not have been changed from
> status
>> open to
>> resolved, rather it should have been changed from priority major to
>> enhancement.
>>
>> Also the poster of the last comment should have left more details
> with
>> perhaps a
>> patch or unit-test displaying his/her bug.
>>
>>
>> Adam
>>
>>
>> Mark Lester on 30/05/08 14:31, wrote:
>>> Thanks for the quick response. I don't think that is the problem
>>> because that directory is already clear plus I have only used the
>>> current version of struts2
>>>
>>> -----Original Message-----
>>> From: Owen Berry [mailto:owen.berry@(protected)]
>>> Sent: Friday, May 30, 2008 9:24 AM
>>> To: Struts Users Mailing List
>>> Subject: Re: Action-Redirect Parameter Problem
>>>
>>> If you're using Maven, you should try clearing out your local Maven
>>> repository (rm -rf ~/.m2/repository) and try again ... I've had a
>> few
>>> cases where I seemed to be using old versions of jars until I did
>>> this.
>>>
>>> On Fri, May 30, 2008 at 9:18 AM, Mark Lester
> <MarkL@(protected)>
>>> wrote:
>>>> I followed the
>>>> http://struts.apache.org/2.x/docs/redirect-action-result.html To
>>> pass
>>>> parameters to an action
>>>>
>>>> And it generates the exception
>>>>
>>>> Caught OgnlException while setting property 'navigation' on type
>>>> '
org.apache.struts2.dispatcher.ServletActionRedirectResult'.
>>>>
>>>>
>>>>
>>>> I looked the Exception up and I found a bug report for struts 2 at
>>>>
>>>> http://issues.apache.org/struts/browse/WW-1714
>>>>
>>>>
>>>>
>>>> The problem is that it says the issue is resolved as of version
>> 2.08
>>>> but I am using 2.11 and I am still getting the warning.
>>>>
>>>> Information regarding this issue would be very helpful.

Attachment:
user_187141.ezm (zipped)If I don't remember wrong, the problem is that the value of params are
set as properties in the Result object. In the case of the
action-redirect result, these params are used as params to the target
action. The params are indeed passed, but when struts tries to set
them as properties in the result, it fails (hence the logged
exception).
musachy
On Mon, Jun 2, 2008 at 1:09 PM, Adam Hardy
<ahardy.struts@(protected):
> Only solution is a code change where it is logged.
>
> As I said earlier in the thread, I think that closed bug report should be
> re-opened or cloned and set to Enhancement.
>
> Mark Lester on 02/06/08 17:42, wrote:
>>
>> Yeah it sets the parameter for me too it just throws the exception
>> which I a bit of an annoyance and wondering how to make it not throw
>> that exception
>>
>> -----Original Message-----
>> From: Adam Hardy [mailto:ahardy.struts@(protected),
>> June 02, 2008 8:43 AM
>> To: Struts Users Mailing List
>> Subject: Re: Action-Redirect Parameter Problem
>>
>> I had a look at the code and I can see why it throws an exception at
>> that point, but despite that, my experience is that it works - it does set
>> the
>> parameter on my Result.
>>
>> Mark Lester on 02/06/08 13:08, wrote:
>>>
>>> Yeah I am still having problems with it.
>>>
>>> -----Original Message-----
>>> From: Adam Hardy [mailto:ahardy.struts@(protected),
>>> June 01, 2008 2:52 PM
>>> To: Struts Users Mailing List
>>> Subject: Re: Action-Redirect Parameter Problem
>>>
>>> That issue is closed, although there is a comment left after it was
>>> closed suggesting that the issue is still a problem and that the bug
>>> should
>>> be re-opened.
>>>
>>> I see this 'warning' from OGNL wherever I use Action-Redirect
>>
>> results
>>>
>>> with the latest struts2 version, and it's true that the stacktrace in the
>>> webserver log is distracting, but I don't find any problems with it like
>>> the last
>>> comment suggests.
>>>
>>> It's not clear why the poster of that comment didn't re-open the bug
>>> or create a new one if there is a real problem there.
>>>
>>> Do you find problems with it still?
>>>
>>> It seems to me that the issue should not have been changed from
>>
>> status
>>>
>>> open to resolved, rather it should have been changed from priority major
>>> to
>>> enhancement.
>>>
>>> Also the poster of the last comment should have left more details
>>
>> with
>>>
>>> perhaps a patch or unit-test displaying his/her bug.
>>>
>>>
>>> Adam
>>>
>>>
>>> Mark Lester on 30/05/08 14:31, wrote:
>>>>
>>>> Thanks for the quick response. I don't think that is the problem
>>>> because that directory is already clear plus I have only used the
>>>> current version of struts2
>>>> -----Original Message-----
>>>> From: Owen Berry [mailto:owen.berry@(protected),
>>>> 2008 9:24 AM
>>>> To: Struts Users Mailing List
>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>
>>>> If you're using Maven, you should try clearing out your local Maven
>>>> repository (rm -rf ~/.m2/repository) and try again ... I've had a
>>>
>>> few
>>>>
>>>> cases where I seemed to be using old versions of jars until I did
>>>> this.
>>>>
>>>> On Fri, May 30, 2008 at 9:18 AM, Mark Lester
>>
>> <MarkL@(protected)>
>>>>
>>>> wrote:
>>>>>
>>>>> I followed the
>>>>> http://struts.apache.org/2.x/docs/redirect-action-result.html To
>>>>
>>>> pass
>>>>>
>>>>> parameters to an action
>>>>>
>>>>> And it generates the exception
>>>>>
>>>>> Caught OgnlException while setting property 'navigation' on type
>>>>> '
org.apache.struts2.dispatcher.ServletActionRedirectResult'.
>>>>>
>>>>>
>>>>>
>>>>> I looked the Exception up and I found a bug report for struts 2 at
>>>>>
>>>>> http://issues.apache.org/struts/browse/WW-1714
>>>>>
>>>>>
>>>>>
>>>>> The problem is that it says the issue is resolved as of version
>>>
>>> 2.08
>>>>>
>>>>> but I am using 2.11 and I am still getting the warning.
>>>>>
>>>>> Information regarding this issue would be very helpful.
>
>
> ---------------------------------------------------------------------
> 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_187142.ezm (zipped)Don had a better explanation on the issue :)
"The actual problem here is the way that results are created. Result
parameters are supposed to correspond to properties on the Result
object, however the action redirect result uses them as parameters for
its URL. When building the result, ognl will throw an exception, which
is logged as a warn, if it can't set the property on the result
object, which in this case, is ok. I've modified XWork to log them as
debug since warn is too harsh. This has the sideeffect of possibly
hiding issues with result parameters when they really are result
properties, but I think it is the lesser of the two evils. The whole
thing needs to be re-evaluated as there shouldn't be any case when
exceptions thrown are "ok"."
musachy
On Mon, Jun 2, 2008 at 1:51 PM, Musachy Barroso <musachy@(protected):
> If I don't remember wrong, the problem is that the value of params are
> set as properties in the Result object. In the case of the
> action-redirect result, these params are used as params to the target
> action. The params are indeed passed, but when struts tries to set
> them as properties in the result, it fails (hence the logged
> exception).
>
> musachy
>
> On Mon, Jun 2, 2008 at 1:09 PM, Adam Hardy
> <ahardy.struts@(protected):
>> Only solution is a code change where it is logged.
>>
>> As I said earlier in the thread, I think that closed bug report should be
>> re-opened or cloned and set to Enhancement.
>>
>> Mark Lester on 02/06/08 17:42, wrote:
>>>
>>> Yeah it sets the parameter for me too it just throws the exception
>>> which I a bit of an annoyance and wondering how to make it not throw
>>> that exception
>>>
>>> -----Original Message-----
>>> From: Adam Hardy [mailto:ahardy.struts@(protected),
>>> June 02, 2008 8:43 AM
>>> To: Struts Users Mailing List
>>> Subject: Re: Action-Redirect Parameter Problem
>>>
>>> I had a look at the code and I can see why it throws an exception at
>>> that point, but despite that, my experience is that it works - it does set
>>> the
>>> parameter on my Result.
>>>
>>> Mark Lester on 02/06/08 13:08, wrote:
>>>>
>>>> Yeah I am still having problems with it.
>>>>
>>>> -----Original Message-----
>>>> From: Adam Hardy [mailto:ahardy.struts@(protected),
>>>> June 01, 2008 2:52 PM
>>>> To: Struts Users Mailing List
>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>
>>>> That issue is closed, although there is a comment left after it was
>>>> closed suggesting that the issue is still a problem and that the bug
>>>> should
>>>> be re-opened.
>>>>
>>>> I see this 'warning' from OGNL wherever I use Action-Redirect
>>>
>>> results
>>>>
>>>> with the latest struts2 version, and it's true that the stacktrace in the
>>>> webserver log is distracting, but I don't find any problems with it like
>>>> the last
>>>> comment suggests.
>>>>
>>>> It's not clear why the poster of that comment didn't re-open the bug
>>>> or create a new one if there is a real problem there.
>>>>
>>>> Do you find problems with it still?
>>>>
>>>> It seems to me that the issue should not have been changed from
>>>
>>> status
>>>>
>>>> open to resolved, rather it should have been changed from priority major
>>>> to
>>>> enhancement.
>>>>
>>>> Also the poster of the last comment should have left more details
>>>
>>> with
>>>>
>>>> perhaps a patch or unit-test displaying his/her bug.
>>>>
>>>>
>>>> Adam
>>>>
>>>>
>>>> Mark Lester on 30/05/08 14:31, wrote:
>>>>>
>>>>> Thanks for the quick response. I don't think that is the problem
>>>>> because that directory is already clear plus I have only used the
>>>>> current version of struts2
>>>>> -----Original Message-----
>>>>> From: Owen Berry [mailto:owen.berry@(protected),
>>>>> 2008 9:24 AM
>>>>> To: Struts Users Mailing List
>>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>>
>>>>> If you're using Maven, you should try clearing out your local Maven
>>>>> repository (rm -rf ~/.m2/repository) and try again ... I've had a
>>>>
>>>> few
>>>>>
>>>>> cases where I seemed to be using old versions of jars until I did
>>>>> this.
>>>>>
>>>>> On Fri, May 30, 2008 at 9:18 AM, Mark Lester
>>>
>>> <MarkL@(protected)>
>>>>>
>>>>> wrote:
>>>>>>
>>>>>> I followed the
>>>>>> http://struts.apache.org/2.x/docs/redirect-action-result.html To
>>>>>
>>>>> pass
>>>>>>
>>>>>> parameters to an action
>>>>>>
>>>>>> And it generates the exception
>>>>>>
>>>>>> Caught OgnlException while setting property 'navigation' on type
>>>>>> '
org.apache.struts2.dispatcher.ServletActionRedirectResult'.
>>>>>>
>>>>>>
>>>>>>
>>>>>> I looked the Exception up and I found a bug report for struts 2 at
>>>>>>
>>>>>> http://issues.apache.org/struts/browse/WW-1714
>>>>>>
>>>>>>
>>>>>>
>>>>>> The problem is that it says the issue is resolved as of version
>>>>
>>>> 2.08
>>>>>>
>>>>>> but I am using 2.11 and I am still getting the warning.
>>>>>>
>>>>>> Information regarding this issue would be very helpful.
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_187155.ezm (zipped)That's a lucid explanation alright, but there are still a few unanswered questions:
- it's marked as resolved for 2.0.8, presumably the resolution is the change
of the logging from WARN to DEBUG. However in OgnlUtil line 369 in v2.0.9, it's
still logged at WARN.
- perhaps this log level change should be requested and the issue should be
re-opened as an enhancement?
- the real enhancement is as Don says, to refactor the code so that no
exception is thrown.
Musachy Barroso on 02/06/08 18:52, wrote:
> Don had a better explanation on the issue :)
>
> "The actual problem here is the way that results are created. Result
> parameters are supposed to correspond to properties on the Result
> object, however the action redirect result uses them as parameters for
> its URL. When building the result, ognl will throw an exception, which
> is logged as a warn, if it can't set the property on the result
> object, which in this case, is ok. I've modified XWork to log them as
> debug since warn is too harsh. This has the sideeffect of possibly
> hiding issues with result parameters when they really are result
> properties, but I think it is the lesser of the two evils. The whole
> thing needs to be re-evaluated as there shouldn't be any case when
> exceptions thrown are "ok"."
>
> musachy
>
> On Mon, Jun 2, 2008 at 1:51 PM, Musachy Barroso <musachy@(protected):
>> If I don't remember wrong, the problem is that the value of params are
>> set as properties in the Result object. In the case of the
>> action-redirect result, these params are used as params to the target
>> action. The params are indeed passed, but when struts tries to set
>> them as properties in the result, it fails (hence the logged
>> exception).
>>
>> musachy
>>
>> On Mon, Jun 2, 2008 at 1:09 PM, Adam Hardy
>> <ahardy.struts@(protected):
>>> Only solution is a code change where it is logged.
>>>
>>> As I said earlier in the thread, I think that closed bug report should be
>>> re-opened or cloned and set to Enhancement.
>>>
>>> Mark Lester on 02/06/08 17:42, wrote:
>>>> Yeah it sets the parameter for me too it just throws the exception
>>>> which I a bit of an annoyance and wondering how to make it not throw
>>>> that exception
>>>>
>>>> -----Original Message-----
>>>> From: Adam Hardy [mailto:ahardy.struts@(protected),
>>>> June 02, 2008 8:43 AM
>>>> To: Struts Users Mailing List
>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>
>>>> I had a look at the code and I can see why it throws an exception at
>>>> that point, but despite that, my experience is that it works - it does set
>>>> the
>>>> parameter on my Result.
>>>>
>>>> Mark Lester on 02/06/08 13:08, wrote:
>>>>> Yeah I am still having problems with it.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Adam Hardy [mailto:ahardy.struts@(protected),
>>>>> June 01, 2008 2:52 PM
>>>>> To: Struts Users Mailing List
>>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>>
>>>>> That issue is closed, although there is a comment left after it was
>>>>> closed suggesting that the issue is still a problem and that the bug
>>>>> should
>>>>> be re-opened.
>>>>>
>>>>> I see this 'warning' from OGNL wherever I use Action-Redirect
>>>> results
>>>>> with the latest struts2 version, and it's true that the stacktrace in the
>>>>> webserver log is distracting, but I don't find any problems with it like
>>>>> the last
>>>>> comment suggests.
>>>>>
>>>>> It's not clear why the poster of that comment didn't re-open the bug
>>>>> or create a new one if there is a real problem there.
>>>>>
>>>>> Do you find problems with it still?
>>>>>
>>>>> It seems to me that the issue should not have been changed from
>>>> status
>>>>> open to resolved, rather it should have been changed from priority major
>>>>> to
>>>>> enhancement.
>>>>>
>>>>> Also the poster of the last comment should have left more details
>>>> with
>>>>> perhaps a patch or unit-test displaying his/her bug.
>>>>>
>>>>>
>>>>> Adam
>>>>>
>>>>>
>>>>> Mark Lester on 30/05/08 14:31, wrote:
>>>>>> Thanks for the quick response. I don't think that is the problem
>>>>>> because that directory is already clear plus I have only used the
>>>>>> current version of struts2
>>>>>> -----Original Message-----
>>>>>> From: Owen Berry [mailto:owen.berry@(protected),
>>>>>> 2008 9:24 AM
>>>>>> To: Struts Users Mailing List
>>>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>>>
>>>>>> If you're using Maven, you should try clearing out your local Maven
>>>>>> repository (rm -rf ~/.m2/repository) and try again ... I've had a
>>>>> few
>>>>>> cases where I seemed to be using old versions of jars until I did
>>>>>> this.
>>>>>>
>>>>>> On Fri, May 30, 2008 at 9:18 AM, Mark Lester
>>>> <MarkL@(protected)>
>>>>>> wrote:
>>>>>>> I followed the
>>>>>>> http://struts.apache.org/2.x/docs/redirect-action-result.html To
>>>>>> pass
>>>>>>> parameters to an action
>>>>>>>
>>>>>>> And it generates the exception
>>>>>>>
>>>>>>> Caught OgnlException while setting property 'navigation' on type
>>>>>>> '
org.apache.struts2.dispatcher.ServletActionRedirectResult'.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I looked the Exception up and I found a bug report for struts 2 at
>>>>>>>
>>>>>>> http://issues.apache.org/struts/browse/WW-1714
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> The problem is that it says the issue is resolved as of version
>>>>> 2.08
>>>>>>> but I am using 2.11 and I am still getting the warning.
>>>>>>>
>>>>>>> Information regarding this issue would be very helpful.
>>>
>>> ---------------------------------------------------------------------
>>> 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_187156.ezm (zipped)This should probably be re-opened as a bug. Just thinking out loud
here, there should be some interface that results must implement if
they want to use params this way, so the ReflectionProvider will just
pass the params thru the interface method, instead of trying to set
them as properties.
musachy
On Mon, Jun 2, 2008 at 6:20 PM, Adam Hardy
<ahardy.struts@(protected):
> That's a lucid explanation alright, but there are still a few unanswered
> questions:
>
> - it's marked as resolved for 2.0.8, presumably the resolution is the
> change of the logging from WARN to DEBUG. However in OgnlUtil line 369 in
> v2.0.9, it's still logged at WARN.
>
> - perhaps this log level change should be requested and the issue should be
> re-opened as an enhancement?
>
> - the real enhancement is as Don says, to refactor the code so that no
> exception is thrown.
>
> Musachy Barroso on 02/06/08 18:52, wrote:
>>
>> Don had a better explanation on the issue :)
>>
>> "The actual problem here is the way that results are created. Result
>> parameters are supposed to correspond to properties on the Result
>> object, however the action redirect result uses them as parameters for
>> its URL. When building the result, ognl will throw an exception, which
>> is logged as a warn, if it can't set the property on the result
>> object, which in this case, is ok. I've modified XWork to log them as
>> debug since warn is too harsh. This has the sideeffect of possibly
>> hiding issues with result parameters when they really are result
>> properties, but I think it is the lesser of the two evils. The whole
>> thing needs to be re-evaluated as there shouldn't be any case when
>> exceptions thrown are "ok"."
>>
>> musachy
>>
>> On Mon, Jun 2, 2008 at 1:51 PM, Musachy Barroso <musachy@(protected):
>>>
>>> If I don't remember wrong, the problem is that the value of params are
>>> set as properties in the Result object. In the case of the
>>> action-redirect result, these params are used as params to the target
>>> action. The params are indeed passed, but when struts tries to set
>>> them as properties in the result, it fails (hence the logged
>>> exception).
>>>
>>> musachy
>>>
>>> On Mon, Jun 2, 2008 at 1:09 PM, Adam Hardy
>>> <ahardy.struts@(protected):
>>>>
>>>> Only solution is a code change where it is logged.
>>>>
>>>> As I said earlier in the thread, I think that closed bug report should
>>>> be
>>>> re-opened or cloned and set to Enhancement.
>>>>
>>>> Mark Lester on 02/06/08 17:42, wrote:
>>>>>
>>>>> Yeah it sets the parameter for me too it just throws the exception
>>>>> which I a bit of an annoyance and wondering how to make it not throw
>>>>> that exception
>>>>>
>>>>> -----Original Message-----
>>>>> From: Adam Hardy [mailto:ahardy.struts@(protected):
>>>>> Monday,
>>>>> June 02, 2008 8:43 AM
>>>>> To: Struts Users Mailing List
>>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>>
>>>>> I had a look at the code and I can see why it throws an exception at
>>>>> that point, but despite that, my experience is that it works - it does
>>>>> set
>>>>> the
>>>>> parameter on my Result.
>>>>>
>>>>> Mark Lester on 02/06/08 13:08, wrote:
>>>>>>
>>>>>> Yeah I am still having problems with it.
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Adam Hardy [mailto:ahardy.struts@(protected):
>>>>>> Sunday,
>>>>>> June 01, 2008 2:52 PM
>>>>>> To: Struts Users Mailing List
>>>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>>>
>>>>>> That issue is closed, although there is a comment left after it was
>>>>>> closed suggesting that the issue is still a problem and that the bug
>>>>>> should
>>>>>> be re-opened.
>>>>>>
>>>>>> I see this 'warning' from OGNL wherever I use Action-Redirect
>>>>>
>>>>> results
>>>>>>
>>>>>> with the latest struts2 version, and it's true that the stacktrace in
>>>>>> the
>>>>>> webserver log is distracting, but I don't find any problems with it
>>>>>> like
>>>>>> the last
>>>>>> comment suggests.
>>>>>>
>>>>>> It's not clear why the poster of that comment didn't re-open the bug
>>>>>> or create a new one if there is a real problem there.
>>>>>>
>>>>>> Do you find problems with it still?
>>>>>>
>>>>>> It seems to me that the issue should not have been changed from
>>>>>
>>>>> status
>>>>>>
>>>>>> open to resolved, rather it should have been changed from priority
>>>>>> major
>>>>>> to
>>>>>> enhancement.
>>>>>>
>>>>>> Also the poster of the last comment should have left more details
>>>>>
>>>>> with
>>>>>>
>>>>>> perhaps a patch or unit-test displaying his/her bug.
>>>>>>
>>>>>>
>>>>>> Adam
>>>>>>
>>>>>>
>>>>>> Mark Lester on 30/05/08 14:31, wrote:
>>>>>>>
>>>>>>> Thanks for the quick response. I don't think that is the problem
>>>>>>> because that directory is already clear plus I have only used the
>>>>>>> current version of struts2
>>>>>>> -----Original Message-----
>>>>>>> From: Owen Berry [mailto:owen.berry@(protected),
>>>>>>> 2008 9:24 AM
>>>>>>> To: Struts Users Mailing List
>>>>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>>>>
>>>>>>> If you're using Maven, you should try clearing out your local Maven
>>>>>>> repository (rm -rf ~/.m2/repository) and try again ... I've had a
>>>>>>
>>>>>> few
>>>>>>>
>>>>>>> cases where I seemed to be using old versions of jars until I did
>>>>>>> this.
>>>>>>>
>>>>>>> On Fri, May 30, 2008 at 9:18 AM, Mark Lester
>>>>>
>>>>> <MarkL@(protected)>
>>>>>>>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I followed the
>>>>>>>> http://struts.apache.org/2.x/docs/redirect-action-result.html To
>>>>>>>
>>>>>>> pass
>>>>>>>>
>>>>>>>> parameters to an action
>>>>>>>>
>>>>>>>> And it generates the exception
>>>>>>>>
>>>>>>>> Caught OgnlException while setting property 'navigation' on type
>>>>>>>> '
org.apache.struts2.dispatcher.ServletActionRedirectResult'.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> I looked the Exception up and I found a bug report for struts 2 at
>>>>>>>>
>>>>>>>> http://issues.apache.org/struts/browse/WW-1714
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> The problem is that it says the issue is resolved as of version
>>>>>>
>>>>>> 2.08
>>>>>>>>
>>>>>>>> but I am using 2.11 and I am still getting the warning.
>>>>>>>>
>>>>>>>> Information regarding this issue would be very helpful.
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_187138.ezm (zipped)hi list!
i'm new to struts and tiles and read a lot of docs, tutorials and lists last
few days. i think i got the basics and managed to implement some test
applications.
however, i still don't understand how to get attributes dynamic... i've seen
"runtime composition" in the ViewPreparer and DefinitionFactory, but i don't
know how to access the controller generated data from there..
following situation:
tiles.xml
-----------------
...
<definition name="page" template="/WEB-INF/jsp/layoutABCD.jsp">
<put-attribute name="contentA" value="/WEB-INF/jsp/contentA.jsp" />
<put-attribute name="contentB" value="/WEB-INF/jsp/contentB.jsp" />
<put-attribute name="contentC" value="/WEB-INF/jsp/contentC.jsp" />
<put-attribute name="contentD" value="/WEB-INF/jsp/contentD.jsp" />
</definition>
...
-----------------
struts.xml
-----------------
...
<package name="page" namespace="/page" extends="struts-default">
<result-types>
<result-type name="tiles"
class="org.apache.struts2.views.tiles.TilesResult"/>
</result-types>
<action name="view" class="org.non.actions.PageAction" method="view">
<result name="view" type="tiles">page</result>
...
--------------------
contentX.jsp ( X = A, B, C, D )
--------------------
<%@(protected)" %>
<s:property value="page.contentX" />
-------------------
what i want to do now is to have an arbitrary number of content elements (1)
and to avoid these "stub"-JSPs at all (2)...
for problem (1) i'm going to extend the DefinitionFactory, but that's for
later..
what's more import now is problem (2):
in the ViewPreparer i can add attributes, but i don't know how to access the
action controller to fill them with data.. (as that would avoid the JSPs..)
this must be a very basic problem, so i guess someone can put me on the
right way.
thanks.
markus.

Attachment:
user_187140.ezm (zipped)Hi List,
I'm developing an webapp generating csv files based on some hibernate
queries - so far so good.
Action "csvSelect" is used to display a form with a select box and a
datetimepicker and to pass 2 parameters to the second action
"csvGenerate" which is the one that generates the csv file.
<action name="csvSelect"
class="de.myfiles.actions.CsvSelect">
<result name="success" type="redirectAction">
<param
name="actionName">csvGenerate</param>
</result>
<result name="input"
type="tiles">tiles.page.select</result>
</action>
<action name="csvGenerate"
class="de.myfiles.actions.CsvGenerate">
<result name="success" type="stream"></result>
</action>
To this point everything is working like a charm.
But when I set
response.setHeader("Content-Disposition",
"attachment; filename=myfile.csv");
response.setContentType("text/x-download");
The action is called once and building my csv content - after I return
SUCCESS it displays the Internet Explorer "Open / Save" dialog and when
I click on "open" or "save" the action is called another time - but now
I dont have access to the parameters passed from the first action.
As I am new to struts2 and I am no native speaker I hope that someone
understands what my problem is and gives me a clue!
Thanks in advance!
Jan Froehlich

Attachment:
user_187150.ezm (zipped)Isn't there something about IE that makes two calls, one with a "contype" user agent request header? I remember seeing something about that somewhere relating to PDF documents; I have no idea if it's similar for CSV or not, but it's easy enough to check the wire.
Dave
--- On Mon, 6/2/08, Jan Froehlich <Jan.Froehlich@(protected):
> From: Jan Froehlich <Jan.Froehlich@(protected)>
> Subject: Problem generating a csv file for download
> To: "Struts Users Mailing List" <user@(protected)>
> Date: Monday, June 2, 2008, 1:28 PM
> Hi List,
>
> I'm developing an webapp generating csv files based on
> some hibernate
> queries - so far so good.
>
> Action "csvSelect" is used to display a form with
> a select box and a
> datetimepicker and to pass 2 parameters to the second
> action
> "csvGenerate" which is the one that generates the
> csv file.
>
> <action name="csvSelect"
> class="de.myfiles.actions.CsvSelect">
> <result name="success"
> type="redirectAction">
> <param
> name="actionName">csvGenerate</param>
> </result>
> <result name="input"
> type="tiles">tiles.page.select</result>
> </action>
>
> <action name="csvGenerate"
> class="de.myfiles.actions.CsvGenerate">
> <result name="success"
> type="stream"></result>
> </action>
> To this point everything is working like a charm.
> But when I set
>
> response.setHeader("Content-Disposition",
> "attachment; filename=myfile.csv");
> response.setContentType("text/x-download");
>
> The action is called once and building my csv content -
> after I return
> SUCCESS it displays the Internet Explorer "Open /
> Save" dialog and when
> I click on "open" or "save" the action
> is called another time - but now
> I dont have access to the parameters passed from the first
> action.
>
> As I am new to struts2 and I am no native speaker I hope
> that someone
> understands what my problem is and gives me a clue!
>
> Thanks in advance!
>
> Jan Froehlich
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)

Attachment:
user_187153.ezm (zipped)Hey Dave,
thanks for your hint - I searched for "contype" and guess I found what
you meant.
What I understood is, that IE sends two extra requests after the "main"
request to identify the content type from content that has to be
displayed in a plug-in like Acrobat Reader.
For csv files its different. Those files are just plain text files with
"Colon Separated Values" - means that no plugin is neccesary to display.
For me it s nice to know, but unfortunately it doesn't solve my problem.
Regards
Jan
Von: Dave Newton [mailto:newton.dave@(protected)]
Gesendet: Montag, 2. Juni 2008 22:55
An: Struts Users Mailing List
Betreff: Re: Problem generating a csv file for download
Isn't there something about IE that makes two calls, one with a
"contype" user agent request header? I remember seeing something about
that somewhere relating to PDF documents; I have no idea if it's similar
for CSV or not, but it's easy enough to check the wire.
Dave
--- On Mon, 6/2/08, Jan Froehlich <Jan.Froehlich@(protected):
> From: Jan Froehlich <Jan.Froehlich@(protected)>
> Subject: Problem generating a csv file for download
> To: "Struts Users Mailing List" <user@(protected)>
> Date: Monday, June 2, 2008, 1:28 PM
> Hi List,
>
> I'm developing an webapp generating csv files based on
> some hibernate
> queries - so far so good.
>
> Action "csvSelect" is used to display a form with
> a select box and a
> datetimepicker and to pass 2 parameters to the second
> action
> "csvGenerate" which is the one that generates the
> csv file.
>
> <action name="csvSelect"
> class="de.myfiles.actions.CsvSelect">
> <result name="success"
> type="redirectAction">
> <param
> name="actionName">csvGenerate</param>
> </result>
> <result name="input"
> type="tiles">tiles.page.select</result>
> </action>
>
> <action name="csvGenerate"
> class="de.myfiles.actions.CsvGenerate">
> <result name="success"
> type="stream"></result>
> </action>
> To this point everything is working like a charm.
> But when I set
>
> response.setHeader("Content-Disposition",
> "attachment; filename=myfile.csv");
> response.setContentType("text/x-download");
>
> The action is called once and building my csv content -
> after I return
> SUCCESS it displays the Internet Explorer "Open /
> Save" dialog and when
> I click on "open" or "save" the action
> is called another time - but now
> I dont have access to the parameters passed from the first
> action.
>
> As I am new to struts2 and I am no native speaker I hope
> that someone
> understands what my problem is and gives me a clue!
>
> Thanks in advance!
>
> Jan Froehlich
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_187144.ezm (zipped)Hello,
Is there any way to specify a particular field error like this:
<s:fielderror field="myField" />
instead of:
<s:fielderror><s:param>myField</s:param></s:fielderror>
Thanks,
Dave

Attachment:
user_187152.ezm (zipped)Well... in the Action class just add a field error to a especific field..
On Mon, Jun 2, 2008 at 3:21 PM, David Evans <dsevans@(protected):
> Hello,
>
> Is there any way to specify a particular field error like this:
> <s:fielderror field="myField" />
>
> instead of:
> <s:fielderror><s:param>myField</s:param></s:fielderror>
>
>
> Thanks,
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_187154.ezm (zipped)I'm sorry, my explanation was too brief.
Given that the field "myField" has had a field error added to the
FieldErrors collection, I am wondering if there is a way to display it
on a jsp page that will be shorter than the documented:
<s:fielderror><s:param>myField</s:param></s:fielderror>
I was hoping for something like:
<s:fielderror field="myField" />
Dave
On Mon, 2008-06-02 at 17:59 -0300, Felipe Lorenz wrote:
> Well... in the Action class just add a field error to a especific field..
>
> On Mon, Jun 2, 2008 at 3:21 PM, David Evans <dsevans@(protected):
>
> > Hello,
> >
> > Is there any way to specify a particular field error like this:
> > <s:fielderror field="myField" />
> >
> > instead of:
> > <s:fielderror><s:param>myField</s:param></s:fielderror>
> >
> >
> > Thanks,
> >
> > Dave
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >

Attachment:
user_187148.ezm (zipped)I would expect that to work. You might try initializing User.phone to an
empty list and/or fiddling with a -conversion.properties [1] to try and
coax it into doing the right thing. However, I don't think either of
those should be necessary.
Double check your log files (and perhaps try up'ing the log level for
Struts and Xwork to DEBUG); perhaps that will provide some clue as to
where it's failing.
L.
[1] http://struts.apache.org/2.0.11.1/docs/type-conversion.html
Jacky Shih wrote:
> It is not working even i changed String array to List and append the index
> in the jsp form....
>
> This method works in Struts1.x...but what should i do to make it functioning
> in Struts 2?
>
> can anyone help?
>
> On Mon, Jun 2, 2008 at 11:38 AM, l4kyl4ky@(protected)>
> wrote:
>
>> try using List,
>>
>> public class User {
>> //String [] phone;
>> private List <String> phone;
>>
>> public List<String> getPhone() {
>> return phone;
>> }
>>
>> public void setPhone(List<String> phone) {
>> this.phone = phone;
>> }
>> }
>>
>> the JSP
>> <form name="XXX" action="XXX">
>> <input type=text name="user.phone[0]" />
>> <input type=text name="user.phone[1]" />
>> <input type=text name="user.phone[2]" />
>> <input type=submit name=submit value=submit/>
>> </form>
>>
>>
>> And the action
>>
>> U didn't have to f this
>>
>>> private User user=new User();
>> just
>>
>> private User user;
>> public User getUser(){ return user;}
>> public void setUser(User user) { this.user=user;}
>>
>>
>> Iterator it = getUser().getPhone().iterator();
>> while (it.hasNext()) {
>> Object object = it.next();
>> System.out.print(object);
>>
>> }
>>
>> Jacky Shih wrote:
>>
>>> Hi all,
>>>
>>> I meet a problem on populating array properties...
>>> here is the detail description:
>>>
>>> public class User {
>>> String [] phone;
>>> public String[] getPhone(){
>>> return phone;
>>> }
>>> public void setPhone(String[] phone) {
>>> this.phone=phone;
>>> }
>>> }
>>>
>>> public class UserAction {
>>> private User user=new User();
>>>
>>> public User getUser(){ return user;}
>>> public void setUser(User user) { this.user=user;}
>>>
>>> public String execute() {
>>> // user.getPhone() always return null...
>>> }
>>>
>>> }
>>>
>>>
>>> And i have a jsp which will submit a list of phone to the action class
>>>
>>>
>>> <form name=xxx action=xxx>
>>> <input type=text name="user.phone" />
>>> <input type=text name="user.phone" />
>>> <input type=text name="user.phone" />
>>> <input type=submit name=submit value=submit/>
>>> </form>
>>>
>>>
>>> after the form is submitted... the action class is called, however the
>>> list
>>> of phone can't be populated to the user object in the UserAction class...
>>> i have tried if the phone is not a array type.. the property is populated
>>> to
>>> the user object ...
>>> any suggestion for the issue?
>>> thx alot!
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>

Attachment:
user_187157.ezm (zipped)it's work on struts2 , i'm using struts 2.0.11, using Netbeans 6.0
Perhaps ur forgething something .
explain more were it where didn't work, xos it were running properly
in my environment.
Laurie Harper wrote:
> I would expect that to work. You might try initializing User.phone to
> an empty list and/or fiddling with a -conversion.properties [1] to try
> and coax it into doing the right thing. However, I don't think either
> of those should be necessary.
>
> Double check your log files (and perhaps try up'ing the log level for
> Struts and Xwork to DEBUG); perhaps that will provide some clue as to
> where it's failing.
>
> L.
>
> [1] http://struts.apache.org/2.0.11.1/docs/type-conversion.html
>
> Jacky Shih wrote:
>> It is not working even i changed String array to List and append the
>> index
>> in the jsp form....
>>
>> This method works in Struts1.x...but what should i do to make it
>> functioning
>> in Struts 2?
>>
>> can anyone help?
>>
>> On Mon, Jun 2, 2008 at 11:38 AM, l4kyl4ky@(protected)>
>> wrote:
>>
>>> try using List,
>>>
>>> public class User {
>>> //String [] phone;
>>> private List <String> phone;
>>>
>>> public List<String> getPhone() {
>>> return phone;
>>> }
>>>
>>> public void setPhone(List<String> phone) {
>>> this.phone = phone;
>>> }
>>> }
>>>
>>> the JSP
>>> <form name="XXX" action="XXX">
>>> <input type=text name="user.phone[0]" />
>>> <input type=text name="user.phone[1]" />
>>> <input type=text name="user.phone[2]" />
>>> <input type=submit name=submit value=submit/>
>>> </form>
>>>
>>>
>>> And the action
>>>
>>> U didn't have to f this
>>>
>>>> private User user=new User();
>>> just
>>>
>>> private User user;
>>> public User getUser(){ return user;}
>>> public void setUser(User user) { this.user=user;}
>>>
>>>
>>> Iterator it = getUser().getPhone().iterator();
>>> while (it.hasNext()) {
>>> Object object = it.next();
>>> System.out.print(object);
>>>
>>> }
>>>
>>> Jacky Shih wrote:
>>>
>>>> Hi all,
>>>>
>>>> I meet a problem on populating array properties...
>>>> here is the detail description:
>>>>
>>>> public class User {
>>>> String [] phone;
>>>> public String[] getPhone(){
>>>> return phone;
>>>> }
>>>> public void setPhone(String[] phone) {
>>>> this.phone=phone;
>>>> }
>>>> }
>>>>
>>>> public class UserAction {
>>>> private User user=new User();
>>>>
>>>> public User getUser(){ return user;}
>>>> public void setUser(User user) { this.user=user;}
>>>>
>>>> public String execute() {
>>>> // user.getPhone() always return null...
>>>> }
>>>>
>>>> }
>>>>
>>>>
>>>> And i have a jsp which will submit a list of phone to the action class
>>>>
>>>>
>>>> <form name=xxx action=xxx>
>>>> <input type=text name="user.phone" />
>>>> <input type=text name="user.phone" />
>>>> <input type=text name="user.phone" />
>>>> <input type=submit name=submit value=submit/>
>>>> </form>
>>>>
>>>>
>>>> after the form is submitted... the action class is called, however the
>>>> list
>>>> of phone can't be populated to the user object in the UserAction
>>>> class...
>>>> i have tried if the phone is not a array type.. the property is
>>>> populated
>>>> to
>>>> the user object ...
>>>> any suggestion for the issue?
>>>> thx alot!
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>
> ing the log level fo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> level fo
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_187158.ezm (zipped)perhaps,
u need to set interceptor in ur struts.xml
try using this in ur action
"<interceptor-ref name="params"/>"
Laurie Harper wrote:
> I would expect that to work. You might try initializing User.phone to
> an empty list and/or fiddling with a -conversion.properties [1] to try
> and coax it into doing the right thing. However, I don't think either
> of those should be necessary.
>
> Double check your log files (and perhaps try up'ing the log level for
> Struts and Xwork to DEBUG); perhaps that will provide some clue as to
> where it's failing.
>
> L.
>
> [1] http://struts.apache.org/2.0.11.1/docs/type-conversion.html
>
> Jacky Shih wrote:
>> It is not working even i changed String array to List and append the
>> index
>> in the jsp form....
>>
>> This method works in Struts1.x...but what should i do to make it
>> functioning
>> in Struts 2?
>>
>> can anyone help?
>>
>> On Mon, Jun 2, 2008 at 11:38 AM, l4kyl4ky@(protected)>
>> wrote:
>>
>>> try using List,
>>>
>>> public class User {
>>> //String [] phone;
>>> private List <String> phone;
>>>
>>> public List<String> getPhone() {
>>> return phone;
>>> }
>>>
>>> public void setPhone(List<String> phone) {
>>> this.phone = phone;
>>> }
>>> }
>>>
>>> the JSP
>>> <form name="XXX" action="XXX">
>>> <input type=text name="user.phone[0]" />
>>> <input type=text name="user.phone[1]" />
>>> <input type=text name="user.phone[2]" />
>>> <input type=submit name=submit value=submit/>
>>> </form>
>>>
>>>
>>> And the action
>>>
>>> U didn't have to f this
>>>
>>>> private User user=new User();
>>> just
>>>
>>> private User user;
>>> public User getUser(){ return user;}
>>> public void setUser(User user) { this.user=user;}
>>>
>>>
>>> Iterator it = getUser().getPhone().iterator();
>>> while (it.hasNext()) {
>>> Object object = it.next();
>>> System.out.print(object);
>>>
>>> }
>>>
>>> Jacky Shih wrote:
>>>
>>>> Hi all,
>>>>
>>>> I meet a problem on populating array properties...
>>>> here is the detail description:
>>>>
>>>> public class User {
>>>> String [] phone;
>>>> public String[] getPhone(){
>>>> return phone;
>>>> }
>>>> public void setPhone(String[] phone) {
>>>> this.phone=phone;
>>>> }
>>>> }
>>>>
>>>> public class UserAction {
>>>> private User user=new User();
>>>>
>>>> public User getUser(){ return user;}
>>>> public void setUser(User user) { this.user=user;}
>>>>
>>>> public String execute() {
>>>> // user.getPhone() always return null...
>>>> }
>>>>
>>>> }
>>>>
>>>>
>>>> And i have a jsp which will submit a list of phone to the action class
>>>>
>>>>
>>>> <form name=xxx action=xxx>
>>>> <input type=text name="user.phone" />
>>>> <input type=text name="user.phone" />
>>>> <input type=text name="user.phone" />
>>>> <input type=submit name=submit value=submit/>
>>>> </form>
>>>>
>>>>
>>>> after the form is submitted... the action class is called, however the
>>>> list
>>>> of phone can't be populated to the user object in the UserAction
>>>> class...
>>>> i have tried if the phone is not a array type.. the property is
>>>> populated
>>>> to
>>>> the user object ...
>>>> any suggestion for the issue?
>>>> thx alot!
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_187149.ezm (zipped)Looks like the JCaptcha documentation you followed is inconsistent with
the version of JCaptcha you are using. In any case, it's a JCaptcha
issue rather than a Struts one, and you're probably better off asking on
their forms / user lists.
L.
cacodemon79 wrote:
> Hi, i'm using jcaptcha with Struts 1.3.
> I already configured my web application following the suggestions present at
> the JCAPTCHA homepage and all works.
>
> Now, I'd like to customize the captcha: I'd like to use another engine than
> the default one and try to change other options (size, colour, ...).
>
> I tried to follow the suggestion present at the JCAPTCHA homepage:
>
>
> Basically follow these steps to use another engine in struts:
>
> 1) create a new service class like this:
>
> package mypackage;
> import
com.octo.captcha.engine.image.gimpy.SimpleListImageCaptchaEngine;
>
> import
com.octo.captcha.service.image.EhcacheManageableImageCaptchaService;
>
> import
com.octo.captcha.service.image.ImageCaptchaService;
>
> public class MyOwnManageableImageCaptchaService extends
> EhcacheManageableImageCaptchaService
>
> implements ImageCaptchaService {
>
> public MyOwnManageableImageCaptchaService() {
> super(new SimpleListImageCaptchaEngine(), 180, 100000);
> }}and here pass the wished engine (here SimpleListImageCaptchaEngine which
> I like best) to the superclass...
>
> 2) in the strus-config.xml pass the new service class to the
> CaptchaServicePlugin like this:
>
> <plug-in className="
com.octo.captcha.module.struts.CaptchaServicePlugin">
> <set-property property="serviceClass"
> value="mypackage.MyOwnManageableImageCaptchaService" />
> </plug-in>
>
> but I got some errors/warnings:
> - The type MyOwnManageableImageCaptchaService must implement the inherited
> abstract method ManageableCaptchaService.setCaptchaEngine(CaptchaEngine)
> - The type EhcacheManageableImageCaptchaService is deprecated
> - The constructor EhcacheManageableImageCaptchaService(CaptchaEngine, int,
> int) is deprecated
>
> How can I solve this problem?
>
> Can you help me?
>
> Thanks a lot in advance.

Attachment:
user_187151.ezm (zipped)Yousri BENDI ABDALLAH wrote:
> Good morning,
>
> I use the tag <s:select> of struts 2, with a list
> <s: select name = "month" list = "# (0: 'January', 1: 'February', 2:
> 'March', 3: 'April', 4: 'May', 5: 'June', 6: 'July', 7: 'August', 8:
> 'September', 9: 'October', 10: 'November', 11: 'December') "headerKey =" -1
> "headerValue =" - All months - "/>
>
> My page is http-equiv = "Content-Type" content = "text / html; charset =
> ISO-8859-1"
>
> On a weblogic on windows is good
> or on a Linux server, accents displayed in ^y, and if I met February as it
> appears they are c normal since it is a list, but I can not say how the tag
> encoded in ISO struts2 -8859-1?
>
> LANG = en_US.ISO-8859-01
I don't understand the question; there are no accented characters in
'February' (or anywhere in your example). Are you asking why there is a
charset=ISO-8859-1 in the content-type header at all?
L.