[JIRA] Created: (STS-892) Possibility to remove redundant information in Resolution paths

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Created: (STS-892) Possibility to remove redundant information in Resolution paths

JIRA jira@stripesframework.org
Possibility to remove redundant information in Resolution paths
---------------------------------------------------------------

                 Key: STS-892
                 URL: http://www.stripesframework.org/jira/browse/STS-892
             Project: Stripes
          Issue Type: New Feature
          Components: ActionBean Dispatching
            Reporter: Marcus Kraßmann
            Priority: Minor


In the beginning of Stripes, JSP files usually resided somewhere directly in the webroot, so they were referenced as "/login.jsp" or "admin/users.jsp" in Resolution constructors (the @Wizard concept for example assumed that JSPs were initially called directly, so they had to be accessible from browsers). Nowadays it became standard to have pre-actions for almost all JSPs and to hide them somewhere under the access-protected "/WEB-INF" folder. This way, you will probably have a LoginActionBean that forwards to a file like "/WEB-INF/jsp/login.jsp". This leads to overcomplicated resolution paths which all repeat the prefix "/WEB-INF/jsp/" and the suffix ".jsp".

I must admint that I reviewed the current Spring MVC framework, and they have a nice and clean solution to remove this duplication: They allow a standard prefix and suffix to be defined for the web application. This way, they can always forward to "admin/users" instead of "/WEB-INF/jsp/admin/users.jsp". Duplication removed.

I would appreciate if a similar mechanism would make it into Stripes. As Stripes usually has great defaults, maybe a standard prefix and suffix could be used by default, while developers could change the defaults if they want to. Additionally, the resolver could treat paths with a "/" at the beginning as "absolute" paths, while paths without a beginning slash will be resolved regarding the above rules (with one exception: RedirectResolution to another domain like "http://an.other.domain/...").

More information about the "Spring way":
http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/servlet/view/UrlBasedViewResolver.html

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (STS-892) Possibility to remove redundant information in Resolution paths

JIRA jira@stripesframework.org

    [ http://www.stripesframework.org/jira/browse/STS-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12811#comment-12811 ]

Marcus Kraßmann commented on STS-892:
-------------------------------------

Well, after rethinking this, it just makes sense for the ForwardResolution, as RedirectResolutions always point the browser to a resource that must be directly accessible. I think that would make an implementation just easier...

> Possibility to remove redundant information in Resolution paths
> ---------------------------------------------------------------
>
>                 Key: STS-892
>                 URL: http://www.stripesframework.org/jira/browse/STS-892
>             Project: Stripes
>          Issue Type: New Feature
>          Components: ActionBean Dispatching
>            Reporter: Marcus Kraßmann
>            Priority: Minor
>              Labels: Resolution
>
> In the beginning of Stripes, JSP files usually resided somewhere directly in the webroot, so they were referenced as "/login.jsp" or "admin/users.jsp" in Resolution constructors (the @Wizard concept for example assumed that JSPs were initially called directly, so they had to be accessible from browsers). Nowadays it became standard to have pre-actions for almost all JSPs and to hide them somewhere under the access-protected "/WEB-INF" folder. This way, you will probably have a LoginActionBean that forwards to a file like "/WEB-INF/jsp/login.jsp". This leads to overcomplicated resolution paths which all repeat the prefix "/WEB-INF/jsp/" and the suffix ".jsp".
> I must admint that I reviewed the current Spring MVC framework, and they have a nice and clean solution to remove this duplication: They allow a standard prefix and suffix to be defined for the web application. This way, they can always forward to "admin/users" instead of "/WEB-INF/jsp/admin/users.jsp". Duplication removed.
> I would appreciate if a similar mechanism would make it into Stripes. As Stripes usually has great defaults, maybe a standard prefix and suffix could be used by default, while developers could change the defaults if they want to. Additionally, the resolver could treat paths with a "/" at the beginning as "absolute" paths, while paths without a beginning slash will be resolved regarding the above rules (with one exception: RedirectResolution to another domain like "http://an.other.domain/...").
> More information about the "Spring way":
> http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/servlet/view/UrlBasedViewResolver.html

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (STS-892) Possibility to remove redundant information in Resolution paths

JIRA jira@stripesframework.org
In reply to this post by JIRA jira@stripesframework.org

    [ http://www.stripesframework.org/jira/browse/STS-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12813#comment-12813 ]

Marcus Kraßmann commented on STS-892:
-------------------------------------

Hmm, looks like I duplicated STS-873 ...

> Possibility to remove redundant information in Resolution paths
> ---------------------------------------------------------------
>
>                 Key: STS-892
>                 URL: http://www.stripesframework.org/jira/browse/STS-892
>             Project: Stripes
>          Issue Type: New Feature
>          Components: ActionBean Dispatching
>            Reporter: Marcus Kraßmann
>            Priority: Minor
>              Labels: Resolution
>
> In the beginning of Stripes, JSP files usually resided somewhere directly in the webroot, so they were referenced as "/login.jsp" or "admin/users.jsp" in Resolution constructors (the @Wizard concept for example assumed that JSPs were initially called directly, so they had to be accessible from browsers). Nowadays it became standard to have pre-actions for almost all JSPs and to hide them somewhere under the access-protected "/WEB-INF" folder. This way, you will probably have a LoginActionBean that forwards to a file like "/WEB-INF/jsp/login.jsp". This leads to overcomplicated resolution paths which all repeat the prefix "/WEB-INF/jsp/" and the suffix ".jsp".
> I must admint that I reviewed the current Spring MVC framework, and they have a nice and clean solution to remove this duplication: They allow a standard prefix and suffix to be defined for the web application. This way, they can always forward to "admin/users" instead of "/WEB-INF/jsp/admin/users.jsp". Duplication removed.
> I would appreciate if a similar mechanism would make it into Stripes. As Stripes usually has great defaults, maybe a standard prefix and suffix could be used by default, while developers could change the defaults if they want to. Additionally, the resolver could treat paths with a "/" at the beginning as "absolute" paths, while paths without a beginning slash will be resolved regarding the above rules (with one exception: RedirectResolution to another domain like "http://an.other.domain/...").
> More information about the "Spring way":
> http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/servlet/view/UrlBasedViewResolver.html

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (STS-892) Possibility to remove redundant information in Resolution paths

JIRA jira@stripesframework.org
In reply to this post by JIRA jira@stripesframework.org

    [ http://www.stripesframework.org/jira/browse/STS-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12820#comment-12820 ]

Jon West commented on STS-892:
------------------------------

I just create a custom class which does the prepend/appending that meets my codes need. For example I created a JspResolution class which extends ForwardResolution. It prepends the string passed in with "/pages/" since all my JSP files are in the folder 'pages'.

> Possibility to remove redundant information in Resolution paths
> ---------------------------------------------------------------
>
>                 Key: STS-892
>                 URL: http://www.stripesframework.org/jira/browse/STS-892
>             Project: Stripes
>          Issue Type: New Feature
>          Components: ActionBean Dispatching
>            Reporter: Marcus Kraßmann
>            Priority: Minor
>              Labels: Resolution
>
> In the beginning of Stripes, JSP files usually resided somewhere directly in the webroot, so they were referenced as "/login.jsp" or "admin/users.jsp" in Resolution constructors (the @Wizard concept for example assumed that JSPs were initially called directly, so they had to be accessible from browsers). Nowadays it became standard to have pre-actions for almost all JSPs and to hide them somewhere under the access-protected "/WEB-INF" folder. This way, you will probably have a LoginActionBean that forwards to a file like "/WEB-INF/jsp/login.jsp". This leads to overcomplicated resolution paths which all repeat the prefix "/WEB-INF/jsp/" and the suffix ".jsp".
> I must admint that I reviewed the current Spring MVC framework, and they have a nice and clean solution to remove this duplication: They allow a standard prefix and suffix to be defined for the web application. This way, they can always forward to "admin/users" instead of "/WEB-INF/jsp/admin/users.jsp". Duplication removed.
> I would appreciate if a similar mechanism would make it into Stripes. As Stripes usually has great defaults, maybe a standard prefix and suffix could be used by default, while developers could change the defaults if they want to. Additionally, the resolver could treat paths with a "/" at the beginning as "absolute" paths, while paths without a beginning slash will be resolved regarding the above rules (with one exception: RedirectResolution to another domain like "http://an.other.domain/...").
> More information about the "Spring way":
> http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/servlet/view/UrlBasedViewResolver.html

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development