Announcement Announcement Module
Collapse
No announcement yet.
pls expalin 6 lines of code for me Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • pls expalin 6 lines of code for me

    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;        
        }
Working...
X