Reputation: 9070
I have a page that's accessible like this
http://site/foo.html
Is it possible to make is available at
http://site/foo
just changing the configuration in web.xml?
I'm migrating an application and the second url is bookmarked and linked in several places.
Upvotes: 1
Views: 196
Reputation: 1109625
Is it possible to make ... just changing the configuration in web.xml?
No. You need to either homegrow a simple Filter
for this which transparently forwards the incoming requests based on their URI to the desired resources by RequestDispatcher#forward()
, or to use a 3rd party one such as Tuckey's URL rewrite filter which is much similar to the well known Apache HTTPD's mod_rewrite
.
Upvotes: 2