msgbartop
Just a little about development! Think before you write!
msgbarbottom

Reader's Comments

  1. |

    [...] Comentários Duda on Teste de QIA very simple login example with JSF | Urubatan’s Weblog on Implementando Login com JSF (exemplo simples)alexandre on DAO Generico – um exemplo a [...]

    Reply to this comment
  2. |

    “How would you improve this example?”

    Use Seam?

    Peace
    -stephan


    Stephan Schmidt :: stephan@reposita.org
    Reposita Open Source – Monitor your software development
    http://www.reposita.org
    Blog at http://stephan.reposita.org – No signal. No noise.

    Reply to this comment
  3. |

    Stephan, Seam is a very good framework, but the idea of this post was to teach how the things work behind the scenes :D

    Reply to this comment
  4. |

    Too complicated. I can write the same stuff in several code in raw PHP or even less with SolarPHP or Zend or Symfony framework

    Reply to this comment
  5. |

    vnjug, if I want to let this to the container, I can do it with 4 lines of XML too, but this way is more flexible …
    And in a real application it will probably be wrapped with a little of annotations and AOP :D

    Reply to this comment
  6. |

    Urubatan, ah ok.

    @vnjug: web.xml is created once and then forgotten. And as Urubatan says, faces-config.xml is usually done with annotations.

    Peace
    -stephan

    Reply to this comment
  7. |

    [...] here to [...]

    Reply to this comment
  8. |

    I have a question, How can I logoff?,
    because after login and close the application, I running again and I was still login and could see the “secureData”…
    I just have to undeploy and deploy the aplication again??
    I use netbeans 6.1 and glassfish.

    Reply to this comment
  9. |

    To logout you just need to create a link that will set the loginOk property of the Login bean to false.

    Reply to this comment
  10. |

    thank u for this ex , but i need more examples

    Reply to this comment
  11. |

    I’ve added the part in web.xml to force JSF to bring me to the login page when it sees a SecurityException. However, when it does throw and SecurityException, I get the following:

    javax.faces.FacesException: javax.el.ELException: /somedata.jspx @49,43 value=”#{someData.getSecuredData}”: Error reading ‘getSecuredData’ on type xxx.xxx.SomeData

    It seems that JSF threw another exception called ELException after SecurityException is thrown. Any ideas?

    Reply to this comment
  12. |

    JBLebron, you are right.
    I pratice too, result was org.apache.jasper.el.JspELException! :(

    Reply to this comment

Leave a Comment