In addition to that, if we dont specify element inside then this tells the Container to allow unauthenticated access to URL's matching to element inside .
So does this mean that specifying only element in DD is not enough to allow authentication working, it needs to be used in combination with element too to get authentication working.
does this mean that specifying only <login-config> element in DD is not enough to allow authentication working, it needs to be used in combination with
That is correct.
There is a subtle difference between:
Allowing everybody -> so no <auth-constraint>
Allowing known users -> <auth-constraint> with <role-name> of *