struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Lea <>
Subject Re: can I avoid *.do in my URLs?
Date Sun, 30 Nov 2003 21:18:51 GMT
Have a look at this filter that  Matt Raible came up with:

Alan Bram wrote:

>I would like to avoid having to formulate my URLs as "*.do", or even
>"/do/*".  I want to have simple names like "/foo" and "/bar", names
>that no single pattern could match.  The reason is that I don't want
>to expose implementation details in my URLs, because an implementation
>could change and then my URLs would be no good.  I care about this
>because I want bookmarked URLs within my application to continue to
>(See, especially the section
>called "We used to use a cgi script for this and now we use a binary
>I had planned to accomplish this by making multiple <servlet-mapping>
>entries in the web.xml file, one for each page, each one pointing to
>the controller servlet.  (My application has only a small number of
>pages, so this seemed feasible.)  But I just noticed the following
>warning in the User's Guide (section 5.4.2 "Configure the Action
>Servlet Mapping"):
>    WARNING - Struts will not operate correctly if you define more
>    than one <servlet-mapping> element for the controller servlet.
>Is there some other way I can do this?  Or am I stuck?  (Is there
>maybe some way a servlet Filter could do this for me?)
>Thanks for listening.
> - arb
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Jason Lea

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

View raw message