I am terrible with Faces, i saw this code in a Tutorial online and i would like to get this block explained. this code is part of a bean that is called from a JSF form. I am guessing ExternalContext contains all of the form data. This is being passed to spring via getRequestDispatcher("/j_spring_security_check").

I am very shaky on this, any explanation would be most welcome...

Code:
    public String doAuth() throws IOException, ServletException{
        ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();
        RequestDispatcher dispatcher = ((ServletRequest) context.getRequest()).getRequestDispatcher("/j_spring_security_check");
        dispatcher.forward((ServletRequest) context.getRequest(), (ServletResponse) context.getResponse());
        FacesContext.getCurrentInstance().responseComplete();        
        return null;        
    }