public static boolean evalBoolExpression ( final ExpressionEngine expEngine , final String pscript ) { Object result = null ; String script = "( " + pscript + " )" ; script = script . toUpperCase ( ) . replace ( "AND" , "&&" ) ; script = script . toUpperCase ( ) . replace ( "OR" , "||" ) ; try { result = expEngine . evaluate ( script ) ; } catch ( Exception e ) { LOG . log ( Level . SEVERE , "WebForm WebFormHelper evalBoolExpression script = " + script + "; error = " + e . getLocalizedMessage ( ) , e ) ; } if ( result != null ) { return ( ( Boolean ) result ) . booleanValue ( ) ; } else { return false ; } }
evaluate boolean express .