KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > bridge > jsp > taglib > util > PageContextContainer


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.bridge.jsp.taglib.util;
11
12 import org.mmbase.bridge.jsp.taglib.ContentTag;
13 import javax.servlet.jsp.PageContext JavaDoc;
14
15 import org.mmbase.util.Casting;
16 import org.mmbase.util.transformers.CharTransformer;
17
18 import java.util.*;
19 import org.mmbase.util.logging.Logger;
20 import org.mmbase.util.logging.Logging;
21
22 /**
23  * The page context container stores variables directly in the page context, like JSTL does.
24  *
25  * @author Michiel Meeuwissen
26  * @version $Id: PageContextContainer.java,v 1.13 2005/06/22 19:24:40 michiel Exp $
27  * @since MMBase-1.8
28  **/

29
30 public class PageContextContainer extends ContextContainer {
31     private static final Logger log = Logging.getLoggerInstance(PageContextContainer.class);
32     private static int SCOPE = PageContext.PAGE_SCOPE;
33
34     private PageContextBacking backing;
35     /**
36      * Since a ContextContainer can contain other ContextContainer, it
37      * has to know which ContextContainer contains this. And it also
38      * has an id.
39      */

40
41     public PageContextContainer(final PageContext JavaDoc pc) {
42         super("PAGECONTEXT", null);
43
44         // this Maps pageContext.
45
// This code simply makes pageContext look like a Map (which also can contain null-values).
46
backing = new PageContextBacking(pc);
47     }
48
49     public void release(PageContext JavaDoc pc, ContextContainer p) {
50         backing.release();
51     }
52         
53     protected Backing getBacking() {
54         return backing;
55     }
56
57 }
58
Popular Tags