Annotation Type RequestParam

public @interface RequestParam

Qualifies injection points that should have their values fetched from a corresponding HTTP request parameter (i.e., query string or form parameter).

Example explicit usage, assuming a servlet path /book.jsf?id=3

 private String bookId;

Example implicit usage, assuming the same servlet path

 private String id;

Example explicit usage with default value

 private String bookId;

Because the bean produced is dependent-scoped, use of this annotation on class fields and bean properties is only safe for request-scoped beans. Beans with longer scopes should wrap this bean in a provider and retrieve the value on demand.

 @Inject @RequestParam("id")
 private Instance<String> bookIdProvider;


 String bookId = bookIdProvider.get();

Nicklas Karlsson, Dan Allen

Optional Element Summary
 String value


public abstract String value

Copyright © 2008-2011 Seam Framework. All Rights Reserved.