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

  1. Flightid
  2. numberofseats
  3. Date

    I differently, but badly

      @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> 

    Learn about the ultimate example of all the matrix movements in the URI and the URI. In your case, the Reggex derived from your path will eat all URI parts and will not leave anything for @Pathparam to capture. See Section 3.7.3 of the

    If possible, carry out research to finish the standards.

    Or parse your flightid (which are the matrix parameters, I think) in their own code.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -