7twenty7
7twenty7

Reputation: 568

REST without parameter value?

I have a jnlp application which accepts rest parameters.

Examples:

  1. localhost:8080/myApp/rest//jnlp/Client
  2. localhost:8080/myApp/rest//jnlp/Client?id
  3. localhost:8080/myApp/rest//jnlp/Client?id=

Example 1 and 2 work fine. However, how can I react on the last case? I can run it without parameter, with id but not with id=. That gets me a WebApplicationException. What could I do to allow the third case?

Upvotes: 0

Views: 1621

Answers (1)

Arindam
Arindam

Reputation: 583

There are few ways are to handle the same. Please refer the probable solutions in the following link: Jersey Client / JAX-RS and optional (not default) @QueryParam (client side)

Upvotes: 1

Related Questions