ODstuck
ODstuck

Reputation: 189

Date parameter for a @QueryParam + @PathParam

regarding java jersey how can i state a @DefaultValue for a Date parameter?

ex.

@DefaultValue("?????") @QueryParam("dateCreated") Date dateCreated

Also, continuing the question, how can i leave empty a Date parameter at a URL that is constructed with a @PathParam? Demonstration: http://localhost:8080/testcreate/????? so that its empty or null or whatever except specific formated value ex.

@Path("/testcreate/{date}")
        @GET
        public Response testCreate(@PathParam("date") Date date){}

Upvotes: 1

Views: 873

Answers (0)

Related Questions