home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2000 November / APCD25112k.iso / feature / webserv / SAMBAR43.ZIP / _SETUP.1 / javaeng.jar / javax / servlet / jsp / PageContext.java < prev   
Encoding:
Java Source  |  2000-04-03  |  7.3 KB  |  365 lines

  1. /*
  2.  * pageContext.java -- XXX
  3.  *
  4.  * Copyright (c) 1999 by Free Software Foundation, Inc.
  5.  * Written by Mark Wielaard (mark@klomp.org)
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU Library General Public License as published
  9.  * by the Free Software Foundation, version 2. (see COPYING.LIB)
  10.  *
  11.  * This program is distributed in the hope that it will be useful, but
  12.  * WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program; if not, write to the Free Software Foundation
  18.  * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307 USA
  19.  */
  20.  
  21. package javax.servlet.jsp;
  22.  
  23. import java.io.IOException;
  24. import java.util.Enumeration;
  25. import java.util.Hashtable;
  26.  
  27. import javax.servlet.Servlet;
  28. import javax.servlet.ServletConfig;
  29. import javax.servlet.ServletContext;
  30. import javax.servlet.ServletException;
  31. import javax.servlet.ServletRequest;
  32. import javax.servlet.ServletResponse;
  33. import javax.servlet.http.HttpSession;
  34. import javax.servlet.http.HttpServletRequest;
  35.  
  36. /**
  37.  * XXX
  38.  */
  39. public abstract class PageContext {
  40.  
  41.     // static final ints used to denote the scope
  42.     // [mjw] We don't know what the real values are XXX!!!
  43.  
  44.     /**
  45.      * XXX
  46.      */
  47.     public static final int PAGE_SCOPE = 1; // XXX
  48.  
  49.     /**
  50.      * XXX
  51.      */
  52.     public static final int REQUEST_SCOPE = 2; // XXX
  53.  
  54.     /**
  55.      * XXX
  56.      */
  57.     public static final int SESSION_SCOPE = 3; // XXX
  58.  
  59.     /**
  60.      * XXX
  61.      */
  62.     public static final int APPLICATION_SCOPE = 4; // XXX
  63.  
  64.     // static final strings used in attribute name table
  65.     // [mjw] We don't know what the real values are XXX!!!
  66.  
  67.     /**
  68.      * XXX
  69.      */
  70.     public static final String PAGE = "javax.servlet.jsp.jspPage";
  71.  
  72.  
  73.     /**
  74.      * XXX
  75.      */
  76.     public static final String PAGECONTEXT = "javax.servlet.jsp.jspPageContext";
  77.  
  78.  
  79.     /**
  80.      * XXX
  81.      */
  82.     public static final String REQUEST = "javax.servlet.jsp.jspRequest";
  83.  
  84.  
  85.     /**
  86.      * XXX
  87.      */
  88.     public static final String RESPONSE = "javax.servlet.jsp.jspResponse";
  89.  
  90.  
  91.     /**
  92.      * XXX
  93.      */
  94.     public static final String CONFIG = "javax.servlet.jsp.jspConfig";
  95.  
  96.  
  97.     /**
  98.      * XXX
  99.      */
  100.     public static final String SESSION = "javax.servlet.jsp.jspSession";
  101.  
  102.  
  103.     /**
  104.      * XXX
  105.      */
  106.     public static final String OUT = "javax.servlet.jsp.jspOut";
  107.  
  108.  
  109.     /**
  110.      * XXX
  111.      */
  112.     public static final String APPLICATION = "javax.servlet.jsp.jspApplication";
  113.  
  114.  
  115.     /**
  116.      * XXX
  117.      */
  118.     public static final String EXCEPTION = "javax.servlet.jsp.jspException";
  119.  
  120.  
  121.     // Constructor
  122.  
  123.     public PageContext() {
  124.     }
  125.  
  126.  
  127.     /**
  128.      * XXX
  129.      *
  130.      * @param servlet XXX
  131.      * @param request XXX
  132.      * @param response XXX
  133.      * @param errorPageURL XXX
  134.      * @param needsSession XXX
  135.      * @param bufferSize XXX
  136.      * @param autoflush XXX
  137.      *
  138.      * @exception IOException XXX
  139.      * @exception IllegalStateException XXX
  140.      * @exception IllegalArgumentException XXX
  141.      */
  142.     public abstract void initialize( Servlet servlet,
  143.                        ServletRequest request,
  144.                        ServletResponse response,
  145.                        String errorPageURL,
  146.                        boolean needsSession,
  147.                        int bufferSize,
  148.                        boolean autoflush) throws
  149.                         IOException,
  150.                         IllegalArgumentException,
  151.                         IllegalStateException;
  152.  
  153.     /**
  154.      * XXX
  155.      */
  156.     public abstract void release();
  157.  
  158.  
  159.     /**
  160.      * XXX
  161.      *
  162.      * @param name XXX
  163.      * @param attribute XXX
  164.      * @exception NullPointerException XXX
  165.      */
  166.     public abstract void setAttribute(String name, Object attribute) throws
  167.                                                     NullPointerException;
  168.  
  169.     /**
  170.      * XXX
  171.      *
  172.      * @param name XXX
  173.      * @param attribute XXX
  174.      * @param scope XXX
  175.      *
  176.      * @exception IllegalArgumentException XXX
  177.      * @exception NullPointerException XXX
  178.      */
  179.     public abstract void setAttribute(String name,
  180.                       Object attribute,
  181.                       int scope)
  182.                 throws IllegalArgumentException,
  183.                     NullPointerException;
  184.  
  185.     /**
  186.      * XXX
  187.      *
  188.      * @param name XXX
  189.      * @return XXX
  190.      *
  191.      * @exception IllegalArgumentException XXX
  192.      * @exception NullPointerException XXX
  193.      */
  194.     public abstract Object getAttribute(String name)
  195.                     throws IllegalArgumentException,
  196.                         NullPointerException;
  197.  
  198.     /**
  199.      * XXX
  200.      *
  201.      * @param name XXX
  202.      * @return XXX
  203.      *
  204.      * @exception IllegalArgumentException XXX
  205.      * @exception NullPointerException XXX
  206.      */
  207.     public abstract Object getAttribute(String name, int scope)
  208.                     throws IllegalArgumentException,
  209.                         NullPointerException;
  210.  
  211.     /**
  212.      * XXX
  213.      *
  214.      * @param name XXX
  215.      */
  216.     public abstract Object findAttribute(String name);
  217.  
  218.  
  219.     /**
  220.      * XXX
  221.      *
  222.      * @param name XXX
  223.      */
  224.     public abstract void removeAttribute(String name);
  225.  
  226.  
  227.     /**
  228.      * XXX
  229.      *
  230.      * @param name XXX
  231.      * @param scope XXX
  232.      */
  233.     public abstract void removeAttribute(String name, int scope);
  234.  
  235.  
  236.  
  237.     /**
  238.      * XXX
  239.      *
  240.      * @param scope XXX
  241.      * @return XXX
  242.      */
  243.     public abstract int getAttributesScope(String name);
  244.  
  245.  
  246.     /**
  247.      * XXX
  248.      *
  249.      * @param scope XXX
  250.      * @return XXX
  251.      */
  252.     public abstract Enumeration getAttributeNamesInScope(int scope);
  253.  
  254.  
  255.     /**
  256.      * XXX
  257.      *
  258.      * @return XXX
  259.      */
  260.     public abstract JspWriter getOut();
  261.  
  262.  
  263.     /**
  264.      * XXX
  265.      *
  266.      * @return XXX
  267.      */
  268.     public abstract HttpSession getSession();
  269.  
  270.     /**
  271.      * XXX
  272.      *
  273.      * @return the page in the form of a Servlet
  274.      */
  275.     public abstract Object getPage();
  276.  
  277.  
  278.     /**
  279.      * XXX
  280.      *
  281.      * @return XXX
  282.      */
  283.     public abstract ServletRequest getRequest();
  284.  
  285.  
  286.     /**
  287.      * XXX
  288.      *
  289.      * @return XXX
  290.      */
  291.     public abstract ServletResponse getResponse();
  292.  
  293.  
  294.     /**
  295.      * XXX
  296.      *
  297.      * @return XXX
  298.      */
  299.     public abstract Exception getException();
  300.  
  301.  
  302.     /**
  303.      * XXX
  304.      *
  305.      * @return XXX
  306.      */
  307.     public abstract ServletConfig getServletConfig();
  308.  
  309.  
  310.     /**
  311.      * XXX
  312.      *
  313.      * @return XXX
  314.      */
  315.     public abstract ServletContext getServletContext();
  316.  
  317.  
  318.     /**
  319.      * XXX
  320.      *
  321.      * @param urlPath XXX
  322.      *
  323.      * @exception IOException XXX
  324.      * @exception ServletException XXX
  325.      * @exception IllegalArgumentException XXX
  326.      * @exception IllegalStateException XXX
  327.      * @exception SecurityException XXX
  328.      */
  329.     public abstract void forward(String urlPath) throws
  330.                                                    IOException,
  331.                                                    ServletException,
  332.                                                    IllegalArgumentException,
  333.                                                    IllegalStateException,
  334.                                                    SecurityException;
  335.  
  336.     /**
  337.      * XXX
  338.      *
  339.      * @param urlPath XXX
  340.      *
  341.      * @exception IOException XXX
  342.      * @exception ServletException XXX
  343.      * @exception IllegalArgumentException XXX
  344.      * @exception SecurityException XXX
  345.      */
  346.     public abstract void include(String urlPath) throws
  347.                                                    IOException,
  348.                                                    ServletException,
  349.                                                    IllegalArgumentException,
  350.                                                    SecurityException;
  351.  
  352.  
  353.     /**
  354.      * XXX
  355.      *
  356.      * @param exception XXX
  357.      *
  358.      * @exception IOException XXX
  359.      * @exception ServletException XXX
  360.      */
  361.     public abstract void handlePageException(Exception exception)
  362.                             throws IOException,
  363.                                 ServletException;
  364. }
  365.