views:

58

answers:

2

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 only by editing web.xml file?

+3  A: 

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>
Pascal Thivent
Yes. this valie is specified... sorry, my message was modified: I want to redirect "mysite/some_key" to "mysite/index.html?some_key"
Solvek
+2  A: 

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

Thorbjørn Ravn Andersen