For the above try:
@RequestMapping(value="{appname}/{path1}/{path2}/{remainder:.+}")
The default behavior of Spring to stop matching on '.' in urls is not very intuitive. I don't think period character has any special meaning in the context of the path(as opposed to say '/', ';' or '?').