java - How do I use wild cards (*) in url-pattern with MVC correctly -


I try to get the servlet to respond to every request with "/ test / *" URL-pattern I am here. Therefore, this controller should use the following mapping:

  myApp / test / myApp / test / whatever myApp / somehting? Other = stuff  

  & lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; Trial & lt; / Servlet-name & gt; & Lt; URL pattern & gt; / Test / & lt; / URL pattern & gt; & Lt; / Servlet-mapping & gt;  

The controller is said to be fine but forwarding for the view:

  requestdictature view = request .getRequestDispatcher ("test.jsp"); View.forward (request, response);  

is generating an error:

More than maximum depth for the nested request dispatch

I think the URL matches further ideas But happens also? As inward request in it - or partly going through the same routing process

In the URL-pattern * What is the right way to use without this reason?


Comments