[ 
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to