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


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
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
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to