Two ways (both examples assume that the parameter name is parameter as in your question):
Use @ManagedProperty on the desired bean property:
@ManagedProperty("#{param.parameter}")
private String parameter;
This works on request scoped beans only and does not allow for fine grained conversion and validation.
Use in the view pointing to the desired bean property:
This works on view scoped beans as well and allows for fine grained conversion and validation using the standard validators like as on normal input components. It even allows for attaching a .
See also:
- Communication in JSF 2.0 - Processing GET request parameters
- ViewParam vs @ManagedProperty(value = "#{param.id}")