When using Java 6's HttpServer, an HTTP 'context' is created as follows:
HttpServer server = new HttpServer.create(address, 10);
server.createContext("/search", new SearchHandler());
so that when 'search?' is used in the URL, the query portion will be passed to SearchHandler.
A search URL might look like this:
http://www.searchengine.com/search?thing1=foo&thing2=bar
My problem is that if I have a file at the same site called say 'searchData.xml' and if I try fetching it using:
http://www.searchengine.com/searchData.xml
The HttpServer will pass this off to SearchHandler and not read the file! It appears that it is doing a 'startsWith' compare when looking for a context name match.
This can't be the correct behavior can it?
Kevin