We're updating the issue view to help you get more done. 

Possibility to remove redundant information in Resolution paths

Description

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

Environment

None

Status

Assignee

Rick G

Reporter

Marcus Kraßmann

Labels

Tester

None

Components

Fix versions

Priority

Minor