Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## javax.ws.rs
Annotation Type Produces

    @Inherited
    @Target(value={TYPE,METHOD})
    @Retention(value=RUNTIME)
    public @interface Produces

Defines the media type(s) that the methods of a resource class or `MessageBodyWriter` can produce. If not specified then a container will assume that any type can be produced. Method level annotations override a class level annotation. A container is responsible for ensuring that the method invoked is capable of producing one of the media types requested in the HTTP request. If no such method is available the container must respond with a HTTP "406 Not Acceptable" as specified by RFC 2616.

A method for which there is a single-valued `Produces` is not required to set the media type of representations that it produces: the container will use the value of the `Produces` when sending a response.

See Also:
  `MessageBodyWriter`

Optional Element Summary
`java.lang.String[]` | `value` A list of media types.

### value

    public abstract java.lang.String[] value

  A list of media types. E.g. "image/jpeg,image/gif"

  Default:
    "*/*"

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.