Set Class to Page Context : Page Context « JSTL « Java Tutorial

<%@ taglib prefix="c" uri="" %>

  synchronized (pageContext) {
    Class thisClass = getClass();
  // session.setAttribute("thisClass", thisClass);
    pageContext.setAttribute("thisClass", thisClass, PageContext.PAGE_SCOPE);
    System.out.println("Stored reference");

    Class theClass = (Class) pageContext.getAttribute("thisClass", PageContext.PAGE_SCOPE);
    System.out.println("The retrieved reference is " + theClass);

    The class that instantiated this JSP is <c:out value="${}" />.
  Download: 1,021 k)

24.26.Page Context
24.26.1.Set Variable to Page Context
24.26.2.Set Class to Page Context
24.26.3.Query String
24.26.4.Check Page Context Request Method