Results 1 to 2 of 2

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

  1. #1
    Join Date
    May 2005
    Location
    SLC, UT, USA
    Posts
    7

    Default 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. #2
    Join Date
    May 2005
    Location
    London, UK
    Posts
    21

    Default

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

Similar Threads

  1. Replies: 11
    Last Post: Jun 1st, 2006, 04:30 PM
  2. Replies: 0
    Last Post: Sep 5th, 2005, 08:49 AM
  3. Configure path to log file in appCtx.xml?
    By dan.baumann in forum Container
    Replies: 2
    Last Post: Jul 19th, 2005, 08:20 AM
  4. Replies: 3
    Last Post: Nov 17th, 2004, 11:04 AM
  5. Replies: 0
    Last Post: Nov 1st, 2004, 12:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •