0

I have a GET method:

@RequestMapping(method = RequestMethod.GET, value = "/**")
public ResponseEntity<String> getGraph(HttpServletRequest request) {

    String name = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);

and the request has multiple forms like:

  1. www.test.com/abc//def
  2. www.test.com/abc/def
  3. www.test.com/abc/def/ghi

it works fine in cases 2&3 but in case 1 name's value is abc/def not abc//def its replaces the forward slashes to one slash

how i can make it works?

Miro
  • 1

0 Answers0