Project: Tomcat
Bug 41722 role-link tag in web.xml can not be omitted.
Reported: 2007-02-28 01:00:41 | Status: resolved fixed

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 components or in a deployment components 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.

Files changed in fix:
java/org/apache/catalina/deploy/SecurityRoleRef.java java/org/apache/catalina/startup/WebRuleSet.java