Hello,
I am playing with a jboss-javaee6-webapp project. Server: JBoss EAP 6.0
It is deployed as auth.war
When I annotate a servlet with
@WebServlet("/Hello")
public class HelloWorldServlet extends HttpServlet{
I can see the contents under http://localhost:8080/auth/Hello
Then I have tried to add Authentication with this web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app metadata-complete="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>PresentationLayer</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>All</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<role-name>*</role-name>
</security-role>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>DBDomain</realm-name>
</login-config>
</web-app>
The login works, but then I get
What is going on?