Hi,
I am having a problem with the servlet mapping in the web.xml file. Essentially what I am trying to have happen is have a few specific url's go to their corresponding servlets and then send everything else to a different servlet. So in the case below, all .zot or /remoting/... requests would get mapped to the myzot and remoting servlets, respectively. And all other requests would get sent to the profile servlet. However when I tried this, I ended up getting a stack overflow error. Any help would be greatly appreciated.


The following section from my web.xml file is showing what I am trying to do:

Code:
	<servlet>
		<servlet-name>myzot</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>2</load-on-startup>
	</servlet>
	<servlet>
		<servlet-name>remoting</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>3</load-on-startup>
	</servlet>
	<servlet>
		<servlet-name>profile</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>4</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>myzot</servlet-name>
		<url-pattern>*.zot</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>remoting</servlet-name>
		<url-pattern>/remoting/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>profile</servlet-name>
		<url-pattern>/*</url-pattern>
	</servlet-mapping>


So the problem occurs when changing

<servlet-mapping>
<servlet-name>profile</servlet-name>
<url-pattern>/profiles/*</url-pattern>
</servlet-mapping>

to

<servlet-mapping>
<servlet-name>profile</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>


And here is the error from the log files:

org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is java.lang.StackOverflowError
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:408)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:350)
javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:112)
org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:248)
org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1055)
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:819)
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:728)
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396)
org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:350)
javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

..... and the error keeps on repeating