本文整理了Java中org.apache.catalina.Context.findConstraints()
方法的一些代码示例,展示了Context.findConstraints()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.findConstraints()
方法的具体详情如下:
包路径:org.apache.catalina.Context
类名称:Context
方法名:findConstraints
[英]Return the set of security constraints for this web application. If there are none, a zero-length array is returned.
[中]返回此web应用程序的安全约束集。如果没有,则返回零长度数组。
代码示例来源:origin: magro/memcached-session-manager
@Override
public boolean contextHasFormBasedSecurityConstraint(){
if(_contextHasFormBasedSecurityConstraint != null) {
return _contextHasFormBasedSecurityConstraint.booleanValue();
}
final Context context = (Context)getContainer();
final SecurityConstraint[] constraints = context.findConstraints();
final LoginConfig loginConfig = context.getLoginConfig();
_contextHasFormBasedSecurityConstraint = constraints != null && constraints.length > 0
&& loginConfig != null && HttpServletRequest.FORM_AUTH.equals( loginConfig.getAuthMethod() );
return _contextHasFormBasedSecurityConstraint;
}
代码示例来源:origin: magro/memcached-session-manager
@Override
public boolean contextHasFormBasedSecurityConstraint(){
if(_contextHasFormBasedSecurityConstraint != null) {
return _contextHasFormBasedSecurityConstraint.booleanValue();
}
final Context context = getContext();
final SecurityConstraint[] constraints = context.findConstraints();
final LoginConfig loginConfig = context.getLoginConfig();
_contextHasFormBasedSecurityConstraint = constraints != null && constraints.length > 0
&& loginConfig != null && Constants.FORM_METHOD.equals( loginConfig.getAuthMethod() );
return _contextHasFormBasedSecurityConstraint;
}
代码示例来源:origin: magro/memcached-session-manager
public boolean contextHasFormBasedSecurityConstraint(){
if(_contextHasFormBasedSecurityConstraint != null) {
return _contextHasFormBasedSecurityConstraint.booleanValue();
}
final SecurityConstraint[] constraints = getContext().findConstraints();
final LoginConfig loginConfig = getContext().getLoginConfig();
_contextHasFormBasedSecurityConstraint = constraints != null && constraints.length > 0
&& loginConfig != null && HttpServletRequest.FORM_AUTH.equals( loginConfig.getAuthMethod() );
return _contextHasFormBasedSecurityConstraint;
}
代码示例来源:origin: magro/memcached-session-manager
public boolean contextHasFormBasedSecurityConstraint(){
if(_contextHasFormBasedSecurityConstraint != null) {
return _contextHasFormBasedSecurityConstraint.booleanValue();
}
final SecurityConstraint[] constraints = getContext().findConstraints();
final LoginConfig loginConfig = getContext().getLoginConfig();
_contextHasFormBasedSecurityConstraint = constraints != null && constraints.length > 0
&& loginConfig != null && HttpServletRequest.FORM_AUTH.equals( loginConfig.getAuthMethod() );
return _contextHasFormBasedSecurityConstraint;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Return the security constraints for this web application.
* If there are none, a zero-length array is returned.
* @return a string array with a representation of each
* security constraint
* @throws MBeanException propagated from the managed resource access
*/
public String[] findConstraints() throws MBeanException {
Context context = doGetManagedResource();
SecurityConstraint[] constraints = context.findConstraints();
String[] stringConstraints = new String[constraints.length];
for (int counter = 0; counter < constraints.length; counter++) {
stringConstraints[counter] = constraints[counter].toString();
}
return stringConstraints;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Return the security constraints for this web application.
* If there are none, a zero-length array is returned.
* @return a string array with a representation of each
* security constraint
* @throws MBeanException propagated from the managed resource access
*/
public String[] findConstraints() throws MBeanException {
Context context = doGetManagedResource();
SecurityConstraint[] constraints = context.findConstraints();
String[] stringConstraints = new String[constraints.length];
for (int counter = 0; counter < constraints.length; counter++) {
stringConstraints[counter] = constraints[counter].toString();
}
return stringConstraints;
}
代码示例来源:origin: de.javakaffee.msm/memcached-session-manager-tc8
public boolean contextHasFormBasedSecurityConstraint(){
if(_contextHasFormBasedSecurityConstraint != null) {
return _contextHasFormBasedSecurityConstraint.booleanValue();
}
final SecurityConstraint[] constraints = getContext().findConstraints();
final LoginConfig loginConfig = getContext().getLoginConfig();
_contextHasFormBasedSecurityConstraint = constraints != null && constraints.length > 0
&& loginConfig != null && HttpServletRequest.FORM_AUTH.equals( loginConfig.getAuthMethod() );
return _contextHasFormBasedSecurityConstraint;
}
代码示例来源:origin: jboss.web/jbossweb
currentMappings.add(mapping);
SecurityConstraint[] constraints = ((Context) getParent()).findConstraints();
for (SecurityConstraint constraint : constraints) {
for (SecurityCollection collection : constraint.findCollections()) {
代码示例来源:origin: org.jboss.web/jbossweb
currentMappings.add(mapping);
SecurityConstraint[] constraints = ((Context) getParent()).findConstraints();
for (SecurityConstraint constraint : constraints) {
for (SecurityCollection collection : constraint.findCollections()) {
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Return the security constraints for this web application.
* If there are none, a zero-length array is returned.
*/
public String[] findConstraints() throws MBeanException {
Context context;
try {
context = (Context)getManagedResource();
} catch (InstanceNotFoundException e) {
throw new MBeanException(e);
} catch (RuntimeOperationsException e) {
throw new MBeanException(e);
} catch (InvalidTargetObjectTypeException e) {
throw new MBeanException(e);
}
SecurityConstraint[] constraints = context.findConstraints();
String[] stringConstraints = new String[constraints.length];
for(int counter=0; counter < constraints.length; counter++){
stringConstraints[counter]=constraints[counter].toString();
}
return stringConstraints;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Return the security constraints for this web application.
* If there are none, a zero-length array is returned.
*/
public String[] findConstraints() throws MBeanException {
Context context;
try {
context = (Context)getManagedResource();
} catch (InstanceNotFoundException e) {
throw new MBeanException(e);
} catch (RuntimeOperationsException e) {
throw new MBeanException(e);
} catch (InvalidTargetObjectTypeException e) {
throw new MBeanException(e);
}
SecurityConstraint[] constraints = context.findConstraints();
String[] stringConstraints = new String[constraints.length];
for(int counter=0; counter < constraints.length; counter++){
stringConstraints[counter]=constraints[counter].toString();
}
return stringConstraints;
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Return the security constraints for this web application.
* If there are none, a zero-length array is returned.
*/
public String[] findConstraints() throws MBeanException {
Context context;
try {
context = (Context)getManagedResource();
} catch (InstanceNotFoundException e) {
throw new MBeanException(e);
} catch (RuntimeOperationsException e) {
throw new MBeanException(e);
} catch (InvalidTargetObjectTypeException e) {
throw new MBeanException(e);
}
SecurityConstraint[] constraints = context.findConstraints();
String[] stringConstraints = new String[constraints.length];
for(int counter=0; counter < constraints.length; counter++){
stringConstraints[counter]=constraints[counter].toString();
}
return stringConstraints;
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Return the security constraints for this web application.
* If there are none, a zero-length array is returned.
*/
public String[] findConstraints() throws MBeanException {
Context context;
try {
context = (Context)getManagedResource();
} catch (InstanceNotFoundException e) {
throw new MBeanException(e);
} catch (RuntimeOperationsException e) {
throw new MBeanException(e);
} catch (InvalidTargetObjectTypeException e) {
throw new MBeanException(e);
}
SecurityConstraint[] constraints = context.findConstraints();
String[] stringConstraints = new String[constraints.length];
for(int counter=0; counter < constraints.length; counter++){
stringConstraints[counter]=constraints[counter].toString();
}
return stringConstraints;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Return the security constraints for this web application.
* If there are none, a zero-length array is returned.
*/
public String[] findConstraints() throws MBeanException {
Context context;
try {
context = (Context)getManagedResource();
} catch (InstanceNotFoundException e) {
throw new MBeanException(e);
} catch (RuntimeOperationsException e) {
throw new MBeanException(e);
} catch (InvalidTargetObjectTypeException e) {
throw new MBeanException(e);
}
SecurityConstraint[] constraints = context.findConstraints();
String[] stringConstraints = new String[constraints.length];
for(int counter=0; counter < constraints.length; counter++){
stringConstraints[counter]=constraints[counter].toString();
}
return stringConstraints;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Return the security constraints for this web application.
* If there are none, a zero-length array is returned.
*/
public String[] findConstraints() throws MBeanException {
Context context;
try {
context = (Context)getManagedResource();
} catch (InstanceNotFoundException e) {
throw new MBeanException(e);
} catch (RuntimeOperationsException e) {
throw new MBeanException(e);
} catch (InvalidTargetObjectTypeException e) {
throw new MBeanException(e);
}
SecurityConstraint[] constraints = context.findConstraints();
String[] stringConstraints = new String[constraints.length];
for(int counter=0; counter < constraints.length; counter++){
stringConstraints[counter]=constraints[counter].toString();
}
return stringConstraints;
}
代码示例来源:origin: jboss.web/jbossweb
SecurityConstraint constraints[] = context.findConstraints();
for (int i = 0; i < constraints.length; i++) {
String roles[] = constraints[i].findAuthRoles();
代码示例来源:origin: tomcat/catalina
SecurityConstraint constraints[] = context.findConstraints();
for (int i = 0; i < constraints.length; i++) {
String roles[] = constraints[i].findAuthRoles();
代码示例来源:origin: codefollower/Tomcat-Research
SecurityConstraint constraints[] = context.findConstraints();
for (int i = 0; i < constraints.length; i++) {
String roles[] = constraints[i].findAuthRoles();
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
SecurityConstraint constraints[] = context.findConstraints();
for (int i = 0; i < constraints.length; i++) {
String roles[] = constraints[i].findAuthRoles();
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
SecurityConstraint constraints[] = context.findConstraints();
for (int i = 0; i < constraints.length; i++) {
String roles[] = constraints[i].findAuthRoles();
内容来源于网络,如有侵权,请联系作者删除!