Reply To: [Solved] PrettyFaces & JAAS problem

Splash Forums PrettyFaces Users [Solved] PrettyFaces & JAAS problem Reply To: [Solved] PrettyFaces & JAAS problem

#26267

Nasicus
Participant

Hey Lincoln – no problem 🙂

I’m getting the parameters via:

facesContext.getExternalContext().getRequestParameterMap();

but I just tried it with ((HttpServletRequest) facesContext.getExternalContext().getRequest()).getParameter("foo") and the param is also null then.

Maybe the rest of my code does help to find the mistake.

In the login.xhtml I’m calling the bean like this:


<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
	<f:metadata>
	  	<f:event type="preRenderView" listener="#{loginController.tryLoginWithRequestParams}" />
	</f:metadata>
....

And this is the bean:


@Model
public class LoginController {

	@Inject
	private FacesContext facesContext;

	public void tryLoginWithRequestParams(ComponentSystemEvent event) throws IOException {
		Map<String, String> params = facesContext.getExternalContext().getRequestParameterMap();
                ..........
        }
}

`

What I wonder is if prettyfaces even comes BEFORE the JAAS login redirection – I realized that when you’re not logged in you can type what ever you want in the URL and you will always get to the login page – so maybe prettyfaces does not even get the chance to do something? Or maybe prettyfaces puts something in the requestmap and jaas just overrides it? (Aka i am too late in reading it out – maybe my bean is “wrong”?)

  • This reply was modified 7 years, 7 months ago by  Nasicus.
  • This reply was modified 7 years, 7 months ago by  Nasicus.
  • This reply was modified 7 years, 7 months ago by  Nasicus.
  • This reply was modified 7 years, 7 months ago by  Nasicus.
  • This reply was modified 7 years, 7 months ago by  Nasicus.
  • This reply was modified 7 years, 7 months ago by  Nasicus.