This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm in a bit of a situation =) We have set up our web.xml as follows:
This has worked great until today when we added a 3rd party app that uses actualy html files. So now OurServlet tries to process any files that come from /3rdPartyApp/html/*.html. Is there any way to exclude anything that comes form /3rdPartyApp* in the servlet-mapping? Or is there any other way around this, besides changing the filenames or re-mapping our servlet =). The 3rd party app does not need a servlet entry.
TIA. [ October 11, 2005: Message edited by: Eric Martin ]
Well you have *.html. That will include everything. Just change that so that it more accurate. having *.html in the first place is what causes your problem, so don't try to fix your problem by adding something. fix the problem. You mapping should be specific to the detail level that it needs, not to the most generic, which causes maintenance problems later, like you are seeing now.
Mapping *.html to an active resource is a bad idea in any case. And I have the scars to prove it.
Sometimes, "helpful" servers along the way will cache resources that end with .html (or other known static types). This ended up, in a previous job, by serving up data for one customer to another. Yikes. AOL was a big problem with this respect.
I'd avoid mapping servlets to any pattern that could be mistaken for something other than a servlet.