java - How to get path parameters and matrix parameters from the following uri string? Uri is /flights/flightid;numberofseats=2/date -
In the jersey I'm trying to differentiate the absolute and the matrix Ultimate from the following URI string.
/ flights / flightid ;. Numberofseats = 2 / date Things I want different following parameters using jersey I differently, but badly Learn about the ultimate example of all the matrix movements in the URI and the URI. In your case, the Reggex derived from your If possible, carry out research to finish the standards. Or parse your flightid (which are the matrix parameters, I think) in their own code.
@GET @Path (Trying all this code failed = "/ flight / {flightid} / {date}") @Produces (MediaType.TEXT_PLAIN) Public response BookFlight ("numberofseats") numberOfSeats, @PathParam (value = int "flightid") integer flightid, @PathParam (value = "date") string date) {// logic} < / Div>
path will eat all URI parts and will not leave anything for
@Pathparam to capture. See Section 3.7.3 of the
Comments
Post a Comment