I'm stuck trying to get a @RequestMapping into a @PathVariable with multiple directories in it.
The url would be something like:
http://mydomain.com/servlet/image/subdir/another_subdir/image1.gif
The part I would like to match is in bold. It should be able to anything after "image/". That way I can retrieve this image form my filesystem and serve it to the user. (Please not that directly exposing the images is not an option, as they are in WEB-INF.)
I could work around it using the urlrewrite filter, but would prefer to do it within Spring.
I have tried RequestMappings with a regex:
Unfortunately this doesn't work for subdirectories, only the top-level directory works.Code:@RequestMapping(value = "/document/image/{filename:.*}", method = RequestMethod.GET)
Any ideas?


Reply With Quote
