Announcement Announcement Module
Collapse
No announcement yet.
authz tag not working Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • authz tag not working

    I'm using some simple code just to see if the tags would work, unfortunately the "you're logged in" shows up regardless of any situation (not logged in, logged in, hold the right credentials, etc.)

    Code:
    <authz&#58;authorize ifAllGranted="ROLE_USER">
          you're logged in...<br />
    </authz&#58;authorize>
    This is the code I've added to web.xml copied from the reference manual.
    Code:
    <taglib>
         <taglib-uri>http&#58;//acegisecurity.sf.net/authz</taglib-uri>
         <taglib-location>/WEB-INF/authz.tld</taglib-location>
    </taglib>
    Interestingly enough, when I do add this line, eclipse throws up a red X next to the file name to indicate something's wrong. I assume it's because the authz.tld doesn't physically exist there. The acegi-security jar is in the WEB-INF/lib folder, and the rest of the authentication seems to work fine. I'm using Tomcat 5.5. Did I miss something?

  • #2
    The problem was that I didn't have this included on the page. I'm using that it's 3:30AM as my defense.
    <%@ taglib prefix="authz" uri="http://acegisecurity.sf.net/authz" %>

    Comment


    • #3
      Another Problem and Solution

      Thought I'd tack this on, although it doesn't techincally pertain to your problem

      If you are using Sitemesh and Acegi, it is imperative that you order the filters correctly or your authz tags will not work properly in the decorator.

      Comment


      • #4
        I am using sitemesh, I guess I just got lucky, the authz tag is working fine in my decorator.

        Comment

        Working...
        X