Question

I need to retrieve the value of 2 GET parameters I pass to the page using the URL, the problem is that FacesContext just work within a group of pages with a referenced session; and in this case I'm using GET because the url is accessed from an e-mail and not from another page.

I tried the FacesContext approach:

FacesContext context = FacesContext.getCurrentInstance();    
String login = context.getExternalContext().getRequestParameterMap().get("login");
String id = context.getExternalContext().getRequestParameterMap().get("idReunion")

But it returns null when trying to get the context, any other idea how I can accomplish the same without using FacesContext?

Was it helpful?

Solution

The FacesContext is the way to go. We are using it for your applications and are getting parameters as well.

You flagged your questions with "portlet". Depending on your portal you cannot directly pass parameters to your application via the url. Sometimes you require special handling...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top