Announcement Announcement Module
Collapse
No announcement yet.
How to get file and path w/o the Mapped Controller Request Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get file and path w/o the Mapped Controller Request

    Is there an easy way to get the portion of the request's path sans the request controller mapping prefix?

    Example:
    URL:
    Code:
    http://server/webcontext/controller_request/directory/filename.ext
    Simple Request Mapping Snippet:
    Code:
    <prop key="/controller_request/**/*.ext">theController</prop>
    Controller Snippet:
    Code:
    public ModelAndView handleRequest&#40; HttpServletRequest request, HttpServletResponse response&#41; &#123;
    
    String partialPathAndFilename = someHelperClass.getPathWithoutMappedRequest&#40; ... &#41;;
    // returns /directory/filename.ext
    Thanks. Garth.

  • #2
    You're gonna to have to parse the path info by stripping out "/controller_request".

    Comment

    Working...
    X