use of javax.servlet.jsp.el.ExpressionEvaluator in project com.revolsys.open by revolsys.
the class AbstractElementTag method doTag.
/**
* Process the tag.
*
* @throws JspException If there was an exception processing the tag.
* @throws IOException If an i/o error occurs.
*/
@Override
public void doTag() throws JspException, IOException {
try {
final JspContext jspContext = getJspContext();
final JspWriter out = jspContext.getOut();
final ExpressionEvaluator expressionEvaluator = jspContext.getExpressionEvaluator();
final Collection elements = (Collection) expressionEvaluator.evaluate(this.elementExpression, Collection.class, jspContext.getVariableResolver(), null);
if (elements != null) {
serializeElements(out, elements);
}
} catch (final Throwable t) {
log.error(t.getMessage(), t);
throw new JspTagException(t.getMessage(), t);
}
}
use of javax.servlet.jsp.el.ExpressionEvaluator in project com.revolsys.open by revolsys.
the class AbstractMapElementTag method doTag.
/**
* Process the tag.
*
* @throws JspException If there was an exception processing the tag.
* @throws IOException If an i/o error occurs.
*/
@Override
public void doTag() throws JspException, IOException {
try {
final JspContext jspContext = getJspContext();
final JspWriter out = jspContext.getOut();
final ExpressionEvaluator expressionEvaluator = jspContext.getExpressionEvaluator();
final Object t = expressionEvaluator.evaluate(this.mapExpression, Object.class, jspContext.getVariableResolver(), null);
if (t instanceof Map) {
final Map map = (Map) t;
if (map != null) {
final Object object = map.get(this.key);
serializeObject(out, object);
}
} else {
log.debug(t);
}
} catch (final Throwable t) {
log.error(t.getMessage(), t);
throw new JspTagException(t.getMessage(), t);
}
}
Aggregations