Re: Wildcards in <url-pattern>

From: Chris Smith (cdsmith_at_twu.net)
Date: 02/26/04

  • Next message: Ryan Stewart: "Re: rounding numbers up"
    Date: Wed, 25 Feb 2004 16:46:32 -0700
    
    

    Edward Patrick wrote:
    > However; here's my problem. Let's say a page has the following:
    >
    > <LINK rel=style*** type="text/css" href="style.css">
    >
    > Now, since there is no mapping then "style.css" must reside in the
    > root. However; I can have my servlet search for "style.css". Let's
    > say it finds it at "MyApp/ThisClient/style.css".
    >
    > So, my servlet adds the path and then forwards it on.
    >
    > However; since WEB.XML says "*.css", well, now my request with
    > "MyApp/ThisClient/style.css" gets caught too.
    >
    > The result is an endless loop until the server dies.
    >
    > Is there any way around this?

    You could consider using a filter instead. The first time through,
    you'd catch the request and set an attribute in it that it's being
    handled. Every other time through, you'd see that attribute and pass it
    right through.

    -- 
    www.designacourse.com
    The Easiest Way to Train Anyone... Anywhere.
    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
    

  • Next message: Ryan Stewart: "Re: rounding numbers up"