Announcement Announcement Module
No announcement yet.
SecureContext not found when using authz:authorize Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SecureContext not found when using authz:authorize

    In regards to my problem, I probably need a 0.8.2 version of the Acegi tag library, but the default download doesn't appear to come packaged with acegi-security-taglib.jar. I tried building Acegi using maven, but it doesn't find/download some of the required jars. So I'm currently stuck.

    The acegi-security-taglib.jar that have is dated 1/25/05, and when using it, I get a java.lang.NoClassDefFoundError: net/sf/acegisecurity/context/SecureContext error.

    I'm setting up my JSP's like so:
    <%@ taglib prefix="authz" uri="" %>


    <% String disabled = ""; %>

    <authz:authorize ifNotGranted="STAR_ADMINISTRATOR">
    <% disabled = "disabled"; %>


    I'm not sure what to do at this point because my entire security package with the exception of the JSP <authz:authorize ... tag is working fine.

    Any help is appreciated.

  • #2
    Just in case anybody is interested, I answered my own question by referenceing the docs (what a concept) :oops:

    1.7.4. Authorization-Related Tag Libraries
    The Acegi Security System for Spring comes bundled with several JSP tag libraries that eases JSP writing. The tag libraries are known as authz and provide a range of different services.
    All taglib classes are included in the core acegi-security-xx.jar file, with the authz.tld located in the JAR's META-INF directory. This means for JSP 1.2+ web containers you can simply include the JAR in the WAR's WEB-INF/lib directory and it will be available. If you're using a JSP 1.1 container, you'll need to declare the JSP taglib in your web.xml file, and include authz.tld in the WEB-INF/lib directory. The following fragment is added to web.xml&#58;