Hello All,
I have 2 resources:
@Path("{domain}/x_report")
@Path("{domain}/{report_type}/{id}.{format}
The first resource will create the "x" report and save it to disk. The
second resource just serves the file back so it is able to handle any report
type.
So given
http://localhost/context/domain/x_report the first resource is
called and the file is generated. Now I want to get the file at
http://localhost/context/domain/x_report/123456.txt, but the problem is I'm
not really sure what's happening to that request. I would expect it to go to
the second resource, but it doesn't. If I remove the first Path annotation
temporarily then the second resource request works. I've found some threads
explaining the match process with regards to the number of literal
characters and number of parameters, but
http://localhost/context/domain/x_report/123456.txt shouldn't match the
first resource, right?
I was able to hack around the problem by changing the first resource to
@Path("{domain}/{x: x_report}") so now they both have no literal characters
and the second takes precedence because it has more parameters.
Should this work like I think it should or am I missing something?
Thanks,
Darrin