Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package freemarker.ext.jsp;
import  javax.servlet.jsp.el.ExpressionEvaluator;
import  javax.servlet.jsp.el.VariableResolver;
import  javax.servlet.jsp.el.ELException;
import  javax.servlet.jsp.JspFactory;
import  javax.servlet.jsp.PageContext;
import  javax.servlet.ServletException;
Don't use this class; it's only public to work around Google App Engine Java compliance issues. FreeMarker developers only: treat this class as package-visible. Implementation of PageContext that contains JSP 2.0 specific methods.
    private static final Logger LOG = Logger.getLogger("freemarker.jsp");
    static {
        if(JspFactory.getDefaultFactory() == null) {
            JspFactory.setDefaultFactory(new FreeMarkerJspFactory2());
        .debug("Using JspFactory implementation class " + 

Attempts to locate and manufacture an expression evaulator instance. For this to work you must have the Apache Commons-EL package in the classpath. If Commons-EL is not available, this method will throw an UnsupportedOperationException.
    public ExpressionEvaluator getExpressionEvaluator() {
        try {
            Class type = Thread.currentThread().getContextClassLoader().loadClass
            return (ExpressionEvaluator) type.newInstance();
        catch (Exception e) {
            throw new UnsupportedOperationException("In order for the getExpressionEvaluator() " +
                "method to work, you must have downloaded the apache commons-el jar and " +
                "made it available in the classpath.");

Returns a variable resolver that will resolve variables by searching through the page scope, request scope, session scope and application scope for an attribute with a matching name.
    public VariableResolver getVariableResolver() {
        final PageContext ctx = this;
        return new VariableResolver() {
            public Object resolveVariable(String namethrows ELException {
                return ctx.findAttribute(name);

Includes the specified path. The flush argument is ignored!
    public void include(String pathboolean flushthrows IOException, ServletException {
New to GrepCode? Check out our FAQ X