web.xml

来自「JavaWeb高级特性书中源代码」· XML 代码 · 共 21 行

XML
21
字号
<security-constraint>	
	<web-resource-collection>
		<web-resource-name>webapp</web-resource-name>
		<url-pattern>/*.jsp</url-pattern>
		<url-pattern>/*.html</url-pattern>
		<http-method>GET</http-method>
		<http-method>POST</http-method>
	</web-resource-collection>
	<auth-constraint>
		<role-name>it315</role-name>
		<role-name>guest</role-name>
	</auth-constraint>
</security-constraint>
	<login-config>
		<auth-method>BASIC</auth-method>
		<realm-name>it315 realm</realm-name>
	</login-config>
<security-role>
	<role-name>it315</role-name>
	<role-name>guest</role-name>
</security-role>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?