Results 1 to 5 of 5

Thread: why sec:authorize doesn't work?

  1. #1
    Join Date
    Jun 2011
    Posts
    5

    Default why sec:authorize doesn't work?

    I have a JSF 2 page based on Facelets and use Spring Security 3.0.5 behind the application. When I put some tags like this within my page:

    Code:
    <sec:authorize  access="hasRole('SS')" >
    <h:outputText value="X" />
    </sec:authorize>
    the X will display at runtime anyway with any role. The auto completion feature of my eclipse work correctly to show the "sec:" tags and their properties at programming time. what's the problem?

  2. #2
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    What does the html rendered by this page look like?
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

  3. #3
    Join Date
    Jun 2011
    Posts
    5

    Default

    Quote Originally Posted by rwinch View Post
    What does the html rendered by this page look like?
    The source of page is like this:

    <sec:authorize access="hasRole('SS')">X</sec:authorize>

  4. #4
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    This means that you do not have the jsp tags setup correctly. One of the easiest things to check is to ensure that spring-security-taglibs-<version>.jar is in your WEB-INF/lib/.
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

  5. #5
    Join Date
    Jun 2011
    Posts
    5

    Default

    Quote Originally Posted by rwinch View Post
    This means that you do not have the jsp tags setup correctly. One of the easiest things to check is to ensure that spring-security-taglibs-<version>.jar is in your WEB-INF/lib/.
    This is the jar file that is in my WEB-INF/lib/:
    http://search.maven.org/remoteconten....5.RELEASE.jar

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •