0
@Path("/assetViewCount/{path}")

above annotation can be used to retrive myValue into path for url like /assetViewCount/myValue.

How can I get myValue/nextValue from /assetViewCount/myValue/nextValue in path

swapy
  • 290
  • 2
  • 9
  • Could you provide some real-world examples? Are you trying to find to return the `assetViewCount` of 2 different `things`. Is there some relationship between the 2 values? – Will May 13 '14 at 19:41
  • not two different things, basically this ${path} can be a file path something like myFolder/subFolder/myFile.ext – swapy May 14 '14 at 05:57

2 Answers2

1

Actually I found the solution to my problem, following annotation gives whatever there is after /assetViewCount/ into {path}

@Path("/assetViewCount/{path:.*}")
swapy
  • 290
  • 2
  • 9
0

You can use an embedded parameter in Path like this:

@Path("/assetViewCount/{path}/nextValue")
znurgl
  • 1,077
  • 7
  • 12
  • for the url like, /assetViewCount/myValue/nextValue, it will give me myValue in {path}, but what i am expecting is whatever comes after /assetViewCount into {path} – swapy May 14 '14 at 07:19
  • It really needs to be `@Path("/assetViewCount/{path}/{nextValue}")` – Baldy May 15 '14 at 20:26