You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Al Sutton <al...@alsutton.com> on 2008/06/12 14:31:31 UTC
Defaults for results
Is there any reason why the default result type in struts.xml is
ServletDispatcherResult, but in Zero-Conf the default for @Result is
NullResult?
Wouldn't it make life easier for newcomers to have the defaults the same
for struts.xml and Zero-Conf?
Al.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Defaults for results
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Yeah, it is REST plugin related. At the moment a result is mandatory
(enforced by xwork) even though many of the restful operations its
meaningless to declare a result.. In those cases its also inappropriate
to use to ServletRedirectResult so a NullResult can be used.
However, you're right it does not need to be the default for all apps
and it's better to go with consistency.
It's my intention to make results non-mandatory when in the restful
mode. ie. mandatory only when the response needs to invoke result.
Musachy Barroso wrote:
> I am guessing(wild guess) it is somehow related to REST.(output xml, json etc)
>
> musachy
>
> On Thu, Jun 12, 2008 at 10:55 AM, dusty <du...@yahoo.com> wrote:
>
>> +1 for identical default behavior between XML and Annotations.
>>
>> Mr. Don, do you remember why you came up with the NullResult?
>>
>> -D
>>
>> James Holmes-2 wrote:
>>
>>> Not sure why there is a difference. Perhaps there's good reason? But if
>>> not,
>>> I'm in favor of consistency and making things the same.
>>>
>>> Good catch.
>>>
>>> On Thu, Jun 12, 2008 at 8:31 AM, Al Sutton <al...@alsutton.com> wrote:
>>>
>>>
>>>> Is there any reason why the default result type in struts.xml is
>>>> ServletDispatcherResult, but in Zero-Conf the default for @Result is
>>>> NullResult?
>>>>
>>>> Wouldn't it make life easier for newcomers to have the defaults the same
>>>> for struts.xml and Zero-Conf?
>>>>
>>>> Al.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>>
>>>>
>>>>
>>>
>> --
>> View this message in context: http://www.nabble.com/Defaults-for-results-tp17798824p17802029.html
>> Sent from the Struts - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>>
>
>
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 8.0.100 / Virus Database: 270.3.0/1498 - Release Date: 11/06/2008 7:13 PM
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Defaults for results
Posted by Al Sutton <al...@alsutton.com>.
My guess would be it's because the absolute default for default results
is undefined, it's just that many people include struts-default.xml in
their config which defines ServletDispatcherResult with default set to
true and thus it becomes the global default.
Musachy Barroso wrote:
> I am guessing(wild guess) it is somehow related to REST.(output xml, json etc)
>
> musachy
>
> On Thu, Jun 12, 2008 at 10:55 AM, dusty <du...@yahoo.com> wrote:
>
>> +1 for identical default behavior between XML and Annotations.
>>
>> Mr. Don, do you remember why you came up with the NullResult?
>>
>> -D
>>
>> James Holmes-2 wrote:
>>
>>> Not sure why there is a difference. Perhaps there's good reason? But if
>>> not,
>>> I'm in favor of consistency and making things the same.
>>>
>>> Good catch.
>>>
>>> On Thu, Jun 12, 2008 at 8:31 AM, Al Sutton <al...@alsutton.com> wrote:
>>>
>>>
>>>> Is there any reason why the default result type in struts.xml is
>>>> ServletDispatcherResult, but in Zero-Conf the default for @Result is
>>>> NullResult?
>>>>
>>>> Wouldn't it make life easier for newcomers to have the defaults the same
>>>> for struts.xml and Zero-Conf?
>>>>
>>>> Al.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>>
>>>>
>>>>
>>>
>> --
>> View this message in context: http://www.nabble.com/Defaults-for-results-tp17798824p17802029.html
>> Sent from the Struts - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Defaults for results
Posted by Musachy Barroso <mu...@gmail.com>.
I am guessing(wild guess) it is somehow related to REST.(output xml, json etc)
musachy
On Thu, Jun 12, 2008 at 10:55 AM, dusty <du...@yahoo.com> wrote:
>
> +1 for identical default behavior between XML and Annotations.
>
> Mr. Don, do you remember why you came up with the NullResult?
>
> -D
>
> James Holmes-2 wrote:
>>
>> Not sure why there is a difference. Perhaps there's good reason? But if
>> not,
>> I'm in favor of consistency and making things the same.
>>
>> Good catch.
>>
>> On Thu, Jun 12, 2008 at 8:31 AM, Al Sutton <al...@alsutton.com> wrote:
>>
>>> Is there any reason why the default result type in struts.xml is
>>> ServletDispatcherResult, but in Zero-Conf the default for @Result is
>>> NullResult?
>>>
>>> Wouldn't it make life easier for newcomers to have the defaults the same
>>> for struts.xml and Zero-Conf?
>>>
>>> Al.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Defaults-for-results-tp17798824p17802029.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Defaults for results
Posted by dusty <du...@yahoo.com>.
+1 for identical default behavior between XML and Annotations.
Mr. Don, do you remember why you came up with the NullResult?
-D
James Holmes-2 wrote:
>
> Not sure why there is a difference. Perhaps there's good reason? But if
> not,
> I'm in favor of consistency and making things the same.
>
> Good catch.
>
> On Thu, Jun 12, 2008 at 8:31 AM, Al Sutton <al...@alsutton.com> wrote:
>
>> Is there any reason why the default result type in struts.xml is
>> ServletDispatcherResult, but in Zero-Conf the default for @Result is
>> NullResult?
>>
>> Wouldn't it make life easier for newcomers to have the defaults the same
>> for struts.xml and Zero-Conf?
>>
>> Al.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Defaults-for-results-tp17798824p17802029.html
Sent from the Struts - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Defaults for results
Posted by James Holmes <ja...@jamesholmes.com>.
Not sure why there is a difference. Perhaps there's good reason? But if not,
I'm in favor of consistency and making things the same.
Good catch.
On Thu, Jun 12, 2008 at 8:31 AM, Al Sutton <al...@alsutton.com> wrote:
> Is there any reason why the default result type in struts.xml is
> ServletDispatcherResult, but in Zero-Conf the default for @Result is
> NullResult?
>
> Wouldn't it make life easier for newcomers to have the defaults the same
> for struts.xml and Zero-Conf?
>
> Al.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>