private Pattern loadAcceptPattern ( ExternalContext context ) { assert context != null ; String mappings = context . getInitParameter ( ViewHandler . FACELETS_VIEW_MAPPINGS_PARAM_NAME ) ; if ( mappings == null ) { return null ; } // Make sure the mappings contain something mappings = mappings . trim ( ) ; if ( mappings . length ( ) == 0 ) { return null ; } return Pattern . compile ( toRegex ( mappings ) ) ; }
Load and compile a regular expression pattern built from the Facelet view mapping parameters .