Example usage for javax.servlet.jsp PageContext include

List of usage examples for javax.servlet.jsp PageContext include

Introduction

In this page you can find the example usage for javax.servlet.jsp PageContext include.

Prototype

abstract public void include(String relativeUrlPath, boolean flush) throws ServletException, IOException;

Source Link

Document

Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread.

Usage

From source file:org.lightadmin.core.view.editor.JspFragmentFieldControl.java

@Override
public void doTag() throws JspException, IOException {
    addAttribute("field", field);
    addAttribute("attributeMetadata", persistentProperty);
    prepare();//ww  w.j a  v  a  2  s  . c o m
    PageContext pageContext = (PageContext) getJspContext();
    try {
        pageContext.include(jspPath, true);
    } catch (ServletException e) {
        throw new JspException(e);
    } finally {
        pageContext.removeAttribute("field", REQUEST_SCOPE);
        pageContext.removeAttribute("attributeMetadata", REQUEST_SCOPE);
    }
}