Showing posts with label basic authentication in tomcat. Show all posts
Showing posts with label basic authentication in tomcat. 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

Kali Linux Remote Desktop: Access GNOME from Windows Using Native RDP

  Kali Linux + GNOME 50 + GNOME Remote Desktop + Windows Remote Desktop (MSTSC) Getting a full GNOME desktop remotely on Kali Linux can be ...