You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "spiker (JIRA)" <ji...@apache.org> on 2009/02/10 09:53:45 UTC

[jira] Created: (WW-2991) More intelligent result mapping.

More intelligent result mapping.
--------------------------------

                 Key: WW-2991
                 URL: https://issues.apache.org/struts/browse/WW-2991
             Project: Struts 2
          Issue Type: New Feature
          Components: Plugin - Convention
    Affects Versions: 2.1.6
            Reporter: spiker


More intelligent result mapping could make Convention plugin more conventional. Here was my some initial thought:

In my personal experience, most of the time, logical result name was not necessary.

If the result string was "create.jsp", it will be dispatch to "create.jsp" under same package in "/WEB-INF/content". No need to look up "create.vm" or other  guess work, performance will also increase. 

If the result string was "/login.jsp", it will be dispatch to "/WEB-INF/content/login.jsp" .

If the result string was "redirect:create.jsp", then change result type to "redirect".

If the result string was "edit.action", it will be chained to "EditAction" under same namespace.

If the result string was SomeOtherAction.class.toString(), it will be chained to the SomeOtherAction.

To change default result type of action from chain to other result type, just prepend result type in result string, for example: "redirect:edit.action".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2991) More intelligent result mapping.

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45600#action_45600 ] 

Musachy Barroso commented on WW-2991:
-------------------------------------

I would advise you to start a thread in @dev to discuss this and get some input, as for myself, I think the whole idea goes against some of the Struts 2 core patterns.

> More intelligent result mapping.
> --------------------------------
>
>                 Key: WW-2991
>                 URL: https://issues.apache.org/struts/browse/WW-2991
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>            Reporter: spiker
>         Attachments: ConventionUnknownHandler.java, diff_to_2_1_6.txt
>
>
> More intelligent result mapping could make Convention plugin more conventional. Here was my some initial thought:
> In my personal experience, most of the time, logical result name was not necessary.
> If the result string was "create.jsp", it will be dispatch to "create.jsp" under same package in "/WEB-INF/content". No need to look up "create.vm" or other  guess work, performance will also increase. 
> If the result string was "/login.jsp", it will be dispatch to "/WEB-INF/content/login.jsp" .
> If the result string was "redirect:create.jsp", then change result type to "redirect".
> If the result string was "edit.action", it will be chained to "EditAction" under same namespace.
> If the result string was SomeOtherAction.class.toString(), it will be chained to the SomeOtherAction.
> To change default result type of action from chain to other result type, just prepend result type in result string, for example: "redirect:edit.action".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WW-2991) More intelligent result mapping.

Posted by "spiker (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45599#action_45599 ] 

spiker edited comment on WW-2991 at 2/13/09 6:44 AM:
-----------------------------------------------------

This is my work on this issue except the full-action-class-name result.

And I found xwork did not cache returned results and actions. I need to implement some unknown-result cache and unknown-action cache to improve performance.

      was (Author: spiker):
    This is my work on this issue except the full-action-name-based result.

And I found xwork did not cache returned results and actions. I need to implement some unknown-result cache and unknown-action cache to improve performance.
  
> More intelligent result mapping.
> --------------------------------
>
>                 Key: WW-2991
>                 URL: https://issues.apache.org/struts/browse/WW-2991
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>            Reporter: spiker
>         Attachments: ConventionUnknownHandler.java, diff_to_2_1_6.txt
>
>
> More intelligent result mapping could make Convention plugin more conventional. Here was my some initial thought:
> In my personal experience, most of the time, logical result name was not necessary.
> If the result string was "create.jsp", it will be dispatch to "create.jsp" under same package in "/WEB-INF/content". No need to look up "create.vm" or other  guess work, performance will also increase. 
> If the result string was "/login.jsp", it will be dispatch to "/WEB-INF/content/login.jsp" .
> If the result string was "redirect:create.jsp", then change result type to "redirect".
> If the result string was "edit.action", it will be chained to "EditAction" under same namespace.
> If the result string was SomeOtherAction.class.toString(), it will be chained to the SomeOtherAction.
> To change default result type of action from chain to other result type, just prepend result type in result string, for example: "redirect:edit.action".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-2991) More intelligent result mapping.

Posted by "spiker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

spiker updated WW-2991:
-----------------------

    Attachment: diff_to_2_1_6.txt
                ConventionUnknownHandler.java

This is my work on this issue except the full-action-name-based result.

And I found xwork did not cache returned results and actions. I need to implement some unknown-result cache and unknown-action cache to improve performance.

> More intelligent result mapping.
> --------------------------------
>
>                 Key: WW-2991
>                 URL: https://issues.apache.org/struts/browse/WW-2991
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>            Reporter: spiker
>         Attachments: ConventionUnknownHandler.java, diff_to_2_1_6.txt
>
>
> More intelligent result mapping could make Convention plugin more conventional. Here was my some initial thought:
> In my personal experience, most of the time, logical result name was not necessary.
> If the result string was "create.jsp", it will be dispatch to "create.jsp" under same package in "/WEB-INF/content". No need to look up "create.vm" or other  guess work, performance will also increase. 
> If the result string was "/login.jsp", it will be dispatch to "/WEB-INF/content/login.jsp" .
> If the result string was "redirect:create.jsp", then change result type to "redirect".
> If the result string was "edit.action", it will be chained to "EditAction" under same namespace.
> If the result string was SomeOtherAction.class.toString(), it will be chained to the SomeOtherAction.
> To change default result type of action from chain to other result type, just prepend result type in result string, for example: "redirect:edit.action".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-2991) More intelligent result mapping.

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso resolved WW-2991.
---------------------------------

    Resolution: Won't Fix

Discussed in @dev, and we agreed about not implementing this. thanks for reporting tho.

> More intelligent result mapping.
> --------------------------------
>
>                 Key: WW-2991
>                 URL: https://issues.apache.org/struts/browse/WW-2991
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>            Reporter: spiker
>         Attachments: ConventionUnknownHandler.java, diff_to_2_1_6.txt
>
>
> More intelligent result mapping could make Convention plugin more conventional. Here was my some initial thought:
> In my personal experience, most of the time, logical result name was not necessary.
> If the result string was "create.jsp", it will be dispatch to "create.jsp" under same package in "/WEB-INF/content". No need to look up "create.vm" or other  guess work, performance will also increase. 
> If the result string was "/login.jsp", it will be dispatch to "/WEB-INF/content/login.jsp" .
> If the result string was "redirect:create.jsp", then change result type to "redirect".
> If the result string was "edit.action", it will be chained to "EditAction" under same namespace.
> If the result string was SomeOtherAction.class.toString(), it will be chained to the SomeOtherAction.
> To change default result type of action from chain to other result type, just prepend result type in result string, for example: "redirect:edit.action".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.