Search This Blog

Showing posts with label tomcat basic authentication. Show all posts
Showing posts with label tomcat basic authentication. Show all posts

Thursday, April 5, 2012

Basic authentication in Apache TomCat



1 .
Add :
     <security-constraint>
<web-resource-collection>
<web-resource-name>Wildcard means whole app requires authentication</web-resource-name>
  <!-- this will decide on what folder you need authentication /* means all folders or root dir give this path according to your requirement.-->
<url-pattern>/*</url-pattern>      
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<!-- rolename added in tomcat-user.xml-->
<role-name>authrole</role-name>
</auth-constraint>

Featured Posts

Unlock Hidden Windows Startup and Shutdown Details : How to Enable Verbose Startup and Shutdown Messages in Windows 11

WINDOWS TROUBLESHOOTING · FULL GUIDE Unlock Hidden Windows Startup and Shutdown Details Enable Verbose Status...