User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
I'm using plain-vanilla Jetty 8 in our application. When a request comes
in, I need to check the headers, and then serve resources out of a
particular subdirectory depending on header contents. I also need to
check an external location to look for updated files.
These requirements suggest I should override DefaultServlet's
getResource() method and return a custom Resource object. This is fine,
but getResource(String path) only passes in a path as an argument, and
not the entire Request object, so I can't get the headers within the
getResource() is called in only one location, in the
DefaultServlet.doGet() method. I tried to override that, but it refers
to a lot of private variables, so I get compile errors.