Red Hat Application Server: JOnAS User Guide | ||
---|---|---|
Prev | Chapter 44. Example for Using Security in JOnAS with Tomcat | Next |
In this example, there are some important points:
the tomcat role defined on the tomcat-users.xml file is local to Tomcat. It is used to authorize access to the servlet.
the tomcat role defined on the jonas-users.properties file is local to JOnAS. It is used to authorize access to the methods of the bean. We have used the same name, tomcat for both, for convenience but it was not mandatory.
the names defined in the tomcat-users.xml and jonas-users.properties files must be the same. Indeed the bean is considering the servlet as its client so that the name of the client in the servlet must be used to control access of the bean.