struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amin Mohammed-Coleman <ami...@gmail.com>
Subject Re: Exception when using ServletActionRedirectResult with @Result
Date Wed, 17 Dec 2008 22:26:39 GMT
Hi

The ServletActionRedirectResult doesn;t have a contactId setter as  
this is Struts class.  The ViewContact action has the relevant setters.


Cheers


On 17 Dec 2008, at 22:16, Oscar Alvarez wrote:

> 2008/12/17 Amin Mohammed-Coleman <aminmc@gmail.com>
>
>> Hi
>>
>> Sorry for sending this again, but I was wondering if someone might  
>> be able
>> to help?
>>
>>
>> Thanks
>>
>> Begin forwarded message:
>>
>> From: Amin Mohammed-Coleman <aminmc@gmail.com>
>>> Date: 24 November 2008 16:50:50 GMT
>>> To: user-help@struts-apache.org
>>> Subject: Exception when using ServletActionRedirectResult with  
>>> @Result
>>>
>>> Hi
>>>
>>> I am trying to redirect the success of an action to another action  
>>> using
>>> the following:
>>>
>>> @Results({
>>>       @Result(name="success", value="viewContact", params=  
>>> {"namespace",
>>> "/", "actionName", "viewContact", "contactId", "${contactId}",
>>> "contactType", "${contactType}"},  
>>> type=ServletActionRedirectResult.class),
>>>       @Result(name="error", value="search.error",  
>>> type=TilesResult.class)
>>> })
>>>
>>>
>>> However I am getting the following exception:
>>>
>>> Caused by: ognl.NoSuchPropertyException:
>>> org.apache.struts2.dispatcher.ServletActionRedirectResult.contactId
>>
>>
>
>
> The class ServletActionRedirectResult has a contactId public  
> setter????
>
>
>
>
>>
>>>       at
>>> ognl 
>>> .ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
>>>       at
>>> com 
>>> .opensymphony 
>>> .xwork2 
>>> .ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)
>>>       at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
>>>       at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
>>>       at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>>>       at ognl.SimpleNode.setValue(SimpleNode.java:246)
>>>       at ognl.Ognl.setValue(Ognl.java:476)
>>>       at
>>> com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:197)
>>>       at
>>> com 
>>> .opensymphony 
>>> .xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:393)
>>>
>>>
>>> I have looked around and upgraded to Struts 2.1.2 and am still  
>>> getting the
>>> exception.  Would it be possible if someone can advise me on what  
>>> I am doing
>>> wrong.
>>>
>>>
>>> Thanks
>>> Amin
>>>
>>
>>
>
>
> -- 
> Thanks,
> Oscar


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


Mime
View raw message