2
我添加了安全約束來保護應用程序的某些文件夾。本地主機的Tomcat領域安全約束禁用
<security-constraint>
<web-resource-collection>
<web-resource-name>panel</web-resource-name>
<url-pattern>/secured/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>super</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Panel</realm-name>
</login-config>
我向tomcat用戶添加了合適的用戶超級用戶,當我部署應用程序時,這似乎都工作正常。然而,當我通過maven在本地從exclipse運行它時,使用tomcat7:run,我的本地設置沒有tomcat-users.xml文件,所以基本上我不知道如何在本地配置用戶。安全工作,但沒有用戶定義。
u能請告訴我如何通過或自定義指定的tomcat-sers.xml文件的內行tomcat的plugn