Register / Login
File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of
Clojure in Action
this week in the
how to create security role with jboss/jetty
posted 12 years ago
I have set up a
that I wish to be available to only certain users.
I have edited the web.xml file to include
<security-constraint> <web-resource-collection> <web-resource-name>SecureResource</web-resource-name> <url-pattern>/SecureServlet</url-pattern> </web-resource-collection> <auth-constraint> <role-name>admin</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> <realm-name>SecureRealm</realm-name> </login-config>
No what I need to know is how to set up the admin
role in jboss/jetty.
I want to do something similar to what you do with
in the tomcat-users.xml
<user name="Joe" password="Blogs" roles="admin"/>
I agree. Here's the link:
after JNDI realm Authentication, need further specificity on authentication
Client-Cert authentication not protecting specified URL pattern
Using Realms for access controll with multiple roles
Is auth-constraint related to security-role?
web.xml security constraint won't work with roles