Menu

Struts Example App - CheckLogonTag

2003-03-06
2003-03-06
  • Jorge de Castro

    Jorge de Castro - 2003-03-06

    Did anyone try the Struts example app? I was playing around with it and testing the CheckLogonTag. I mean, this is supposed to be a tag you put into any jsp page you want to constrain with authorized access. However, playing with the URL on the browser while logged off, you'll get NPEs thrown because the response has been committed and the tag cannot forward to the login page as it is supposed to. One can make it ignore the rest of the page instead of throwing the exception but it doesn't seem a much better solution. Also, "pasting" the logon code on the tag is out of the question :-)

    I implemented a filter which works better as expected.

    Any other ideas? I feel the purpose of the tag is none if it cannot forward when the page is accessed while logged off. The example app I used is the one bundled with Struts rc1

     
    • Ted Husted

      Ted Husted - 2003-03-06

      The real purpose of the tag is just to demonstrate how to write a custom tag for your application. The MailReader example is not a best-practices guide, just a showcase of various things you can do. An open source best-practices example would be a Good Thing, but no one has come forward with one yet.

      -Ted.

       
      • Matt Raible

        Matt Raible - 2003-03-06

        If you're looking for an example of using container-managed security with Struts - checkout struts-resume.  It uses form-based security and also has a slick "remember me" feature for auto-login. ;-)

        Matt

         
        • Jorge de Castro

          Jorge de Castro - 2003-03-06

          I did have a go at the resume app and it certainly rocks! ;-)

          I am also going through hibernate integration and its been a great help!

          j.

           
      • Jorge de Castro

        Jorge de Castro - 2003-03-06

        I would be really interested in contributing for an open-source Struts-best-pratices. What could be the best way to start something like that? Provide small reusable components to the group and let everybody agree on the design/implementation?
        Tutorials by example for each specific Struts component/entity, ie, actions, form beans, etc?  What should be a good the starting point?

         
    • Ted Husted

      Ted Husted - 2003-03-06

      Meanwhile ... I just submitted an Ant script to Hibernate for running the SchemeExport thing. I also just finished porting the eg example to Hibernat 2.0 beta 3. But before I submit that, I'm making a pass at an example struts-hibernate-eg app, that I will post here.

      -Ted.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.