Either fire a redirect..
public void sayHello(){
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
externalContext.redirect("/Hello.jsp?name=" + "laala");
}
.. or if you're already on JSF2, then just define them in navigation case:
<to-view-id>/Hello.jsp?name=#{bean.property}</to-view-id>
(although the .jsp
file extension less or more hints that you're not on JSF2 yet)
When using the JSF2 navigation case, if you want the new URL get reflected in the browser address bar, you need to add a <redirect/>
entry, else it will just do a forward.