Accessing web.xml Metadata from Tomcat: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Tomcat Development") |
No edit summary |
||
Line 2: | Line 2: | ||
* [[Tomcat Development#Subjects|Tomcat Development]] | * [[Tomcat Development#Subjects|Tomcat Development]] | ||
=Overview= | |||
=<security-constraint>= | |||
<span id="security-constraint"></span>web.xml <security-constraint> metadata is represented by <tt>org.apache.catalina.deploy.LoginConfig</tt>. | |||
It can be accessed as follows (the code comes from <tt>org.apache.catalina.authenticator.AuthenticatorBase</tt>). | |||
<pre> | |||
LoginConfig lc = contex.getLoginConfig(); | |||
</pre> | |||
=<login-config>= | |||
<span id="login-config"></span>web.xml <login-config> metadata is represented by <tt>org.apache.catalina.deploy.SecurityConstraint</tt>. | |||
It can be accessed as follows (the code comes from <tt>org.apache.catalina.authenticator.AuthenticatorBase</tt>). | |||
<pre> | |||
Realm realm = this.context.getRealm() | |||
SecurityConstraint [] constraints = realm.findSecurityConstraints(request, this.context); | |||
</pre> |
Latest revision as of 18:40, 27 February 2017
Internal
Overview
<security-constraint>
web.xml <security-constraint> metadata is represented by org.apache.catalina.deploy.LoginConfig.
It can be accessed as follows (the code comes from org.apache.catalina.authenticator.AuthenticatorBase).
LoginConfig lc = contex.getLoginConfig();
<login-config>
web.xml <login-config> metadata is represented by org.apache.catalina.deploy.SecurityConstraint.
It can be accessed as follows (the code comes from org.apache.catalina.authenticator.AuthenticatorBase).
Realm realm = this.context.getRealm() SecurityConstraint [] constraints = realm.findSecurityConstraints(request, this.context);