Why not have your servlet "forward" any request that it does not recognize
to another namespace. In other words, using your example, you would forward
"/app/ball.gif" to "/images/ball.gif", thus eliminating the "/app" mapping.

tim.

> I've tried using the servlet-mapping of /app/* and pointing this to the
> servlet. While this makes requests go to the servlet, if, within that
> servlet, I try to get a request dispatcher to /app/ball.gif and forward
> there, I get back into the servlet again , presumably because /app/ball.gif
> maps to the servlet. This, of course, creates an recursive infinite loop and
> soon the server dies.
> 
> One alternative that might work, but seems somehow "wrong" to me is to name
> every action in the web.xml file, e.g. individually map /app/login,
> /app/logout, /app/dothis, /app/dothat, etc. and then have /app/* for all
> other resources. I'd like to avoid this particular solution.
> 
> Any bright ideas?


Reply via email to