Bug 41722 - role-link tag in web.xml can not be omitted.
Summary: role-link tag in web.xml can not be omitted.
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Servlet & JSP API (show other bugs)
Version: 5.5.20
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-28 01:00 UTC by Suzuki Yuichiro
Modified: 2007-06-24 10:28 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Suzuki Yuichiro 2007-02-28 01:00:41 UTC
The application with follwing web.xml can not be deployed.
---
    <servlet>
      <servlet-name>sample</servlet-name>
      <servlet-class>sample.TheServlet</servlet-class>
      <security-role-ref>
        <role-name>users</role-name>
      </security-role-ref>
    </servlet>

    <servlet-mapping>
    ....
    </servlet-mapping>

    <security-role>
      <role-name>users</role-name>
     </security-role>
---
"java.lang.IllegalArgumentException: Can't convert argument: null" occurred.

The Specification says:
---
The security-role-ref element declares the security role reference in a
component’s or in a deployment component’s code.
It consists of an optional description, the security role name
used in the code(role-name), and an optional link to a security role(role-link).
---
<role-link> is optional.
Comment 1 Mark Thomas 2007-06-24 10:28:41 UTC
This has been fixed in svn and will be included in 5.5.25 and 6.0.14 onwards.