try {
JspContext context = getJspContext();
Object val = new BeanWrapperImpl(entity).getPropertyValue(path);
if (logger.isDebugEnabled()) logger.debug("Obtained value [" + path + "] for bean [" + entity + "]: " + val);
if ((val != null) && encrypt) {
Cipherer cipher = (Cipherer) context.getAttribute(Cipherer.CIPHERER, 2);
val = cipher.encrypt(val.toString());
}
if (hasText(property)) context.setAttribute(property, val);
else if (val != null) context.getOut().print(javascript ? encodeToJSEscapeSequences(val.toString()): encodeToHtmlEntities(val.toString()));
} catch (Exception ex) {
if (logger.isDebugEnabled()) logger.debug("Could not obtain a value for [" + path + "] in bean [" + entity.getClass().getName() + "]: " + ex.getMessage());