struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <>
Subject Action mapping order and using wildcards
Date Thu, 05 May 2005 15:53:17 GMT

My scenarion is that I need all URLs into our domain to route to the struts controller. Furthermore,
we do not want to add new action mappings when we come up with new pages. Our "pages" are
actually database driven by the inbound URL, e.g

When we add new "pages" in the database, we want those immediately available on the site without
new action mappings, without restarts and so fourth.

My plan is as follows. My web.xml drills through everything with 


Then in the struts-config a wildcard will allow us to capture everything
<action path="/**" 
    type="" />

In the action we can then call getPath and we have the path the user used to tie-up with the
database to get our page.


The problem seems to be that now that I want to add a more specific action mapping, e.g

<action path="/view" forward="/jsp/views/view.jsp" />

the request is being picked up by the /** wildcard action mapping
even though it appears in struts-config before the wildcard.

My question therefore is, do struts-config action mappings not get loaded for matching in
order of appearance? and if not, any tips on how to get around this problem?

Thanks, Allistair.

QAS Ltd.
Developers of QuickAddress Software
<a href=""></a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message