It was sent as a request parameter named id . So to the point (and hacks):
String id = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("id");
If the bean is the scope of the request, you can also make this a managed property.
@ManagedProperty(value="#{param.id}") private Integer id;
There may be better ways depending on where #{id} really occurs, which is unclear based on the information given so far in the question. There are situations when you do not need to pass it as a request parameter at all.
source share