SRV.11.2 Specification of Mappings
"A string containing only the ’/’ character indicates the "default" servlet of the application. In this case the servlet path is the request URI minus the context path and the path info is null."
So you really want: <url-pattern>/</url-pattern>
Also that same section states the /* has higher precendence than *.extension
-Tim
Stefan Görling wrote:
Hi,
I want to have all incomming request forwarded to a default servlet. Depending on the URL the request is forwarded to a JSP-page (too dynamic to use apache mod_rewrite).
The problem is that if I define the servlet as: <servlet-mapping> <servlet-name>custom</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>
It will work, but when I do getDispatcher("MyPage.jsp").forward(request,response), it will forward to the servlet in a recursive way.
Is there any way to get a hold of a JSP-dispatcher when forwarding a request in order to do this?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
