Um, you pulled this from default tomcat\conf\web.xml? Because application's web.xml is processed before default web.xml, you had to explicitly process your JSPs before actions?
Why don't you just change your Struts action mapping to something like <servlet-mapping> <servlet-name>controller</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> so Struts would receive calls to actions only, and JSPs would be processed by default mapping? Michael. On 5/6/05, Allistair Crossley <[EMAIL PROTECTED]> wrote: > I found that by placing a direct jsp mapping to Tomcat's JSP servlet, I could > accomplish what I needed, so long as the URL is longer than the catch-all > mapping as per the servlet spec. > > <servlet> > <servlet-name>jsp</servlet-name> > <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> > <init-param> > <param-name>fork</param-name> > <param-value>false</param-value> > </init-param> > <init-param> > <param-name>xpoweredBy</param-name> > <param-value>false</param-value> > </init-param> > <load-on-startup>3</load-on-startup> > </servlet> > > <servlet-mapping> > <servlet-name>jsp</servlet-name> > <url-pattern>/views/*</url-pattern> > </servlet-mapping> > > <servlet-mapping> > <servlet-name>controller</servlet-name> > <url-pattern>/*</url-pattern> > </servlet-mapping> > > > -----Original Message----- > > From: Allistair Crossley > > Sent: 06 May 2005 15:11 > > To: user@struts.apache.org > > Subject: Infinite loop with action mappings > > > > > > Hi, > > > > I have a catch-all servlet mapping to push all requests to my > > Struts controller in web.xml; > > > > <servlet-mapping> > > <servlet-name>controller</servlet-name> > > <url-pattern>/*</url-pattern> > > </servlet-mapping> > > > > I have 2 action mappings; > > > > <action path="/view" forward="/views/layout.jsp"/> > > <action path="/**" type="com.blah.action.PageAction" /> > > > > When I request http://www.domain.com/view Struts finds the > > action mapping and delegates a forward to /views/layout.jsp. > > However, /views/layout.jsp is being picked up by the /* > > servlet mapping in web.xml and being routed back to Struts. > > This time because there is no action mapping for > > /views/layout.jsp it goes to the wildcard action mapping and > > that action's tile view is returned. > > > > This causes an infinite loop in Struts. > > > > Is this more to do with the servlet mapping, or is there > > something I can instruct Struts to do with regard to getting > > that JSP out to the response without causing another call to > > the controller? > > > > I need every request to go into the struts framework, but I > > also need my JSPs to work inside struts which is not > > happening right now due to this infinite loop. > > > > Regards, Allistair > > > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.struts.action.RequestProcessor:174) - Processing > > a 'GET' for path '/view' > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.struts.action.RequestProcessor:992) - Delegating > > via forward to '/views/layout.jsp' > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.catalina.core.ApplicationDispatcher:143) - > > servletPath=, pathInfo=/views/layout.jsp, queryString=null, name=null > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.catalina.core.ApplicationDispatcher:370) - Path > > Based Forward > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.struts.util.ModuleUtils:169) - Get module name for path > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.struts.util.ModuleUtils:193) - Module name found: default > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.struts.action.RequestProcessor:174) - Processing > > a 'GET' for path '/views/layout.jsp' > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.struts.config.ActionConfigMatcher:102) - > > Attempting to match '/views/layout.jsp' to a wildcard pattern > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.struts.action.RequestProcessor:257) - Looking > > for Action instance for class > > com.qas.newmedia.internet.core.page.action.PageAction > > 2005-05-06 14:48:58,424 - DEBUG > > (org.apache.struts.action.RequestProcessor:271) - Returning > > existing Action instance > > ------------------------------------------------------- > > QAS Ltd. > > Developers of QuickAddress Software > > <a href="http://www.qas.com">www.qas.com</a> > > Registered in England: No 2582055 > > Registered in Australia: No 082 851 474 > > ------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]