Hi Gabo

Hi Sergey,

> @Path({filter:.*})
> public Response search(@PathParam("") SearchFilter bean) {

Will do it shortly once I'm done with the spring security stuff


Thanks for pointing me in the right direction. I had changed it as follows:

   @GET
   @Path("/search.*")
   public Accounts getList(
           @Context
           UriInfo uriinfo
           ) {


Even though it works for the moment it probably won't eventually. As I've learnt yesterday, regular expressions can be specified as part of uri template variables only, which is now supported on the trunk. And the above '.*' will have to be escaped

So you'd have to eventually do
@Path("/search{bar:.*}")

So the PathParam("bar") would capture everything - but you wont have to use it. Now that lists of path segments are supported, you can do

@Path("/search{bar:.*}")
public Accounts getList(@PathParam("bar") List<PathSegment> segments) {}

so if you have /search only then this list will be empty (or null ?). if you do search/bar, it will contain /bar, if you do search/bar/foo then bar and foo will be two seperate list entries, so you won't have to parse. Plus segment specific matric parameters will be available too

Cheers, Sergey

From here I'll just parse the path_info.

Again my thanks.

Gabo



Reply via email to