public static ConstraintSecurityHandler getConstraintSecurityHandlerConfidential ( ) { Constraint constraint = new Constraint ( ) ; constraint . setDataConstraint ( Constraint . DC_CONFIDENTIAL ) ; ConstraintMapping constraintMapping = new ConstraintMapping ( ) ; constraintMapping . setConstraint ( constraint ) ; constraintMapping . setPathSpec ( "/*" ) ; ConstraintSecurityHandler constraintSecurityHandler = new ConstraintSecurityHandler ( ) ; constraintSecurityHandler . addConstraintMapping ( constraintMapping ) ; return constraintSecurityHandler ; }
Create constraint which redirect to Secure Port