Uploaded image for project: 'Stripes'
  1. STS-892

Possibility to remove redundant information in Resolution paths


    • Sprint:


      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":




            • Assignee:
              rgrashel Rick Grashel
              mcs Marcus Kraßmann (Inactive)
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: