Reply To: Paramter Always Return Null

Splash Forums Rewrite Users Paramter Always Return Null Reply To: Paramter Always Return Null



You can still use the @Parameter annotation, but because you are using JSF, you also need to use the rewrite-integration-faces module, and add the @Deferred annotation, like so:

First, make sure you include the proper dependency for JSF support:


Then, add the @Deferred annotation to your @Parameter field. The parameter should now be injected properly. (This is due to the fact that the JSF lifecycle is not active yet if Rewrite tries to inject the value in its Servlet Filter, so Rewrite must instead defer until the JSF lifecycle has started, after RESTORE_VIEW phase.

public class ParametrosURL {

	private String pLocalidade;

	public String getpLocalidade() {
		return pLocalidade;

	public void setpLocalidade(String pLocalidade) {
		this.pLocalidade = pLocalidade;

I hope this helps.