84
2017-06-15 13:57:47
0
jsp 소스를 까보면:
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${hasAbc}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
라고 되어 있습니다.
다시 PageContextImpl이 있는 jasper 소스를 까보면:
/**
* Proprietary method to evaluate EL expressions. XXX - This method should
* go away once the EL interpreter moves out of JSTL and into its own
* project. For now, this is necessary because the standard machinery is too
* slow.
*
* @param expression
* The expression to be evaluated
* @param expectedType
* The expected resulting type
* @param pageContext
* The page context
* @param functionMap
* Maps prefix and name to Method
* @return The result of the evaluation
*/
public static Object proprietaryEvaluate(final String expression,
final Class expectedType, final PageContext pageContext,
final ProtectedFunctionMapper functionMap, final boolean escape)
throws ELException {
Object retValue;
final ExpressionFactory exprFactory = jspf.getJspApplicationContext(pageContext.getServletContext()).getExpressionFactory();
if (SecurityUtil.isPackageProtectionEnabled()) {
try {
retValue = AccessController
.doPrivileged(new PrivilegedExceptionAction() {
public Object run() throws Exception {
ELContextImpl ctx = (ELContextImpl) pageContext.getELContext();
ctx.setFunctionMapper(new FunctionMapperImpl(functionMap));
ValueExpression ve = exprFactory.createValueExpression(ctx, expression, expectedType);
return ve.getValue(ctx);
}
});
} catch (PrivilegedActionException ex) {
Exception realEx = ex.getException();
if (realEx instanceof ELException) {
throw (ELException) realEx;
} else {
throw new ELException(realEx);
}
}
} else {
ELContextImpl ctx = (ELContextImpl) pageContext.getELContext();
ctx.setFunctionMapper(new FunctionMapperImpl(functionMap));
ValueExpression ve = exprFactory.createValueExpression(ctx, expression, expectedType);
retValue = ve.getValue(ctx);
}
if (escape && retValue != null) {
retValue = XmlEscape(retValue.toString());
}
return retValue;
}
라고 되어 있네요. 더 이상은 설명은 생략합니드앗