Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7838043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:57:41+00:00 2026-06-02T14:57:41+00:00

In spring 3.0.x I have a handler method that works perfectly like: @RequestMapping(/foo/{version:\\d+}/**) public

  • 0

In spring 3.0.x I have a handler method that works perfectly like:

@RequestMapping("/foo/{version:\\d+}/**")
public void handleVersionedResource(@PathVariable("version") Long version, HttpServletRequest request, HttpServletResponse response) {
     String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);

     // rest of the code maps path and version to a real resource and serves 
     // content with extra long cache control / expires headers
 }

In 3.0.x, ff the request url is /foo/12345/some/resource, then path = “some/resource” (the ** part of the request match).

However, in 3.1.x (tried with both 3.1.0.RELEASE and 3.1.1.RELEASE) path = to the full request path match, so “/foo/12345/some/resource” in my previous example.

So the question is, does anyone have the simplest way to replicate the behavior I was getting in 3.0.x? Also, any insight to why this behavior has changed? Was I doing it wrong in the first place?

Update:
repeat of Spring 3.1.RC1 and PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE – no good answer was given there either.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T14:57:43+00:00Added an answer on June 2, 2026 at 2:57 pm

    Spring 3.1.RC1 and PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE suggests that HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE is internal to Spring and should not be used in your application

    Doing something similar to How to match a Spring @RequestMapping having a @pathVariable containing "/"? would probably be your best bet

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic Spring MVC controller that looks like this: @Controller public void
I have spring 2.5 application and several pages in the flow work perfectly -
I have a spring application that uses an embedded Jetty instance. Since I am
I have this Controller : @Controller @RequestMapping(/path/*) public class MyController { @RequestMapping(value = /,
I have a basic directory app that works fine except that it seems to
I have a .Net COM server that has a method that takes a message
I have the following code that, weirdly, works for a couple of seconds and
I'm having some problems displaying a ProgressDialog. I have a method that scrapes information
Suppose that you have the following logic in place: processMissing(masterKey, masterValue, p.getPropertiesData().get(i).getDuplicates()); public StringBuffer
I have a Method that makes a phone call. The number and delay comes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.