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