I am trying to work out how to redirect from my webapp to another server, preserving any paths and GET vars.
eg
www.myapp.com/foo
foo.com
www.myapp.com/foo/bar
foo.com/bar
www.myapp.com/foo?bar=1
foo.com?bar=1
I would idealy just like to use something like
<mvc:view-controller path="/foo/**" view-name="redirect:http://foo.com**" />
I ended up using a filter.
infrastructurally this seems to be the simplest way
filter implementation:
web.xml
I needed to add 2 url-patterns to allow for