Example usage for javax.servlet.jsp JspApplicationContext addELResolver

List of usage examples for javax.servlet.jsp JspApplicationContext addELResolver

Introduction

In this page you can find the example usage for javax.servlet.jsp JspApplicationContext addELResolver.

Prototype

public void addELResolver(ELResolver resolver);

Source Link

Document

Adds an ELResolver to affect the way EL variables and properties are resolved for EL expressions appearing in JSP pages and tag files.

Usage

From source file:io.undertow.test.jsp.expression.ExpressionJspTestCase.java

public static void testIIllegalState(PageContext pageContext, JspWriter out) throws Exception {
    assert pageContext != null;
    ELContext elContext = pageContext.getELContext();
    assert elContext != null;
    JspApplicationContext jaContext = JspFactory.getDefaultFactory()
            .getJspApplicationContext(pageContext.getServletContext());
    assert jaContext != null;

    try {//  w  ww .  j  a v  a  2  s.c  o  m
        jaContext.addELResolver(new CompositeELResolver());
        out.println("addELResolver call succeeded. Test FAILED.");
    } catch (IllegalStateException ise) {
        out.println("Test PASSED");
    }
}