I use it as follows:
<Context docBase="jquery" path="/js/jquery" /> <Context docBase="foobar/www/javascript" path="/js" /> <Context docBase="foobar/www/css" path="/css" /> <Context docBase="foobar" path="/" />
The context attribute is the path attribute. The request is processed from top to bottom.
Thus, the request for /css/default.css processed only from the 3rd context.
A different order may take a different context.
This is not true :
<Context docBase="foobar" path="/" /> <Context docBase="jquery" path="/js/jquery" /> <Context docBase="foobar/www/javascript" path="/js" /> <Context docBase="foobar/www/css" path="/css" />
Because /css/default.css will be caught in the first context, not the fourth.
Edit 2013-08-10: (Not the author of the answer) It is important to note that although the above method will work, most of it is actually incorrect. See comments for more details.
source share