Results 1 to 2 of 2

Thread: jstl el in <sec:authorize access

  1. #1
    Join Date
    Feb 2010
    Posts
    1

    Default jstl el in <sec:authorize access

    hello!
    i'm new in security and not familiar english.

    so, i use jstl el in security tag.
    <sec:authorize , access attribute

    my code

    <sec:authorize access="hasRole('ROLE_ADMIN') or ( '${simpleBbs.username}' == principal.username )">

    just compare principal.username with simpleBbs.username

    that code makes this error

    /WEB-INF/views/bbs/bbsForm.jsp(63,3) According to TLD or attribute
    directive in tag file, attribute access does not accept any
    expressions

    althougth i can use ${ } in jsp and <c:out value="${}" />

    i don't know why that's not working.

    i use tomcat 6.0 and sevlet 2.5

    please help me
    have a nice day~ guys~

  2. #2
    Join Date
    Sep 2004
    Location
    Manchester, NH
    Posts
    1,236

    Default

    The new tag attributes don't support EL. I think this would be handy, and (other than the obvious potential confusion between JSP EL and SpEL) think it's probably worth asking Luke or filing an enhancement JIRA.
    Peter Mularien | Blog
    Author, Spring Security 3 (Book) - Packt Publishing, Available in print and eBook form
    SCJP 5, Oracle DBA
    Any postings are my own opinion, and should not be attributed to my employer or clients.


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
  •