Something seems to be swallowing colons from the relative part of the URL
when using the hierarchical URIs function.  My code looks like this:

                Router router = new Router();
                Handler getXml = new GetXml();
                router.attach("/getXml/{PID}", getXml);
                Handler trace = new Trace();
                router.attach("/trace", trace);

                // Then attach it to the local host
                container.getDefaultHost().attach("/base", router);

Trace() is a copy of the example from the tutorial.  (It, by the way,
is behaving fine.)  The beginning of getXml looks like this:

        public void handle(Request request, Response response) {
                String pid=(String) request.getAttributes().get("PID");

One URL showing the problem is "http://localhost:8182/base/getXml/test:2";.
When I put a breakpoint in the debugger right at the getAttributes() line,
what I get back as the value of 'pid' is simply "test".  I've tried
encoding the colon on the URL with "\:" and "\\:" and "%3a" but the 
result is always the same -- the colon and everything after it is gone.  
Interestingly, the access log show it to be there:

  INFO: 2006-12-12 15:54:15 GET /base/getXml/test:2 - ...

Any helpful advice from anyone?  Thanks in advance,


Peter

Reply via email to