Spring RequestMapping: Get path with slashes -
is there way first part of url path, before /c:
thats it: /category1/subcategory1.1/subcategory1.1.1/c/{categorycode:.*}
@controller @requestmapping(value = "/**/c") public class categorypagecontroller { @requestmapping(value = "/{categorycode:.*}", method = requestmethod.get) public modelandview viewcategory(@pathvariable string categorycode, final httpservletrequest request) { string categorypath = ... i tried use antpathmatcher (extractpathwithinpattern) i'm not able define correct pattern.
inject request object adding the httpservletrequest method signature, , then access request url calling getrequesturl().
(oh , auto converting answers comments, stackoverflow jumps shark)
Comments
Post a Comment