JBoss.org Community Documentation

- Prev
- Next

## Chapter 15. @DefaultValue

@DefaultValue is a parameter annotation that can be combined with any of the other @*Param annotations to define a default value when the HTTP request item does not exist.

    @GET
    public String getBooks(@QueryParam("num") @DefaultValue("10") int num) {...}

- PrevChapter 14. Optional parameter types
- Top of page
- Front page
- NextChapter 16. @Encoded and encoding