How to configure routing for a java web app
Is there an easy way to rout all requests (except a few specific cases) for url "mysite/" to path "mysite/index.html?" Is it possible to do it on开发者_如何学Cly by editing web.xml file?
Did you try to specify it as welcome file in your web.xml
:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
You can always have a list of welcome pages for directories (those shown if the URL requested maps to a directory).
If this is not enough you may want to look at servlet Filters, which can do all kinds of transformations. http://java.sun.com/products/servlet/Filters.html
精彩评论