org.japano
Class Context

java.lang.Object
  extended by javax.servlet.jsp.JspContext
      extended by javax.servlet.jsp.PageContext
          extended by org.japano.AbstractContext
              extended by org.japano.Context

public class Context
extends AbstractContext

The PageContext used by japano pages.

Version:
$Id: Context.java,v 1.8 2005/09/27 21:30:50 fforw Exp $ SourceForge.net Logo
Author:
Sven Helmberger ( sven dot helmberger at gmx dot de )

Field Summary
 
Fields inherited from class javax.servlet.jsp.PageContext
APPLICATION, APPLICATION_SCOPE, CONFIG, EXCEPTION, OUT, PAGE, PAGE_SCOPE, PAGECONTEXT, REQUEST, REQUEST_SCOPE, RESPONSE, SESSION, SESSION_SCOPE
 
Constructor Summary
Context(JapanoConfig japanoConfig)
          Creates a new instance of Context
 
Method Summary
 void clearPageScope()
          Removes all attributes of the page scope.
 java.lang.Object findAttribute(java.lang.String str)
           
 void forward(java.lang.String str)
           
 java.lang.Object getAttribute(java.lang.String str)
           
 java.lang.Object getAttribute(java.lang.String str, int scope)
           
 java.util.Enumeration getAttributeNamesInScope(int scope)
           
 int getAttributesScope(java.lang.String str)
           
 javax.servlet.jsp.ErrorData getErrorData()
           
 java.lang.Exception getException()
           
 javax.servlet.jsp.el.ExpressionEvaluator getExpressionEvaluator()
          This method returns always null because japano resolves Expressions only at JSP compile time
 JapanoConfig getJapanoConfig()
          Returns the japano configuration for the japano website this context is in.
 javax.servlet.jsp.JspWriter getOut()
           
 java.lang.Object getPage()
           
 javax.servlet.ServletRequest getRequest()
           
 javax.servlet.ServletResponse getResponse()
           
static int getScopeFromName(java.lang.String scope)
           
 javax.servlet.ServletConfig getServletConfig()
           
 javax.servlet.ServletContext getServletContext()
           
 javax.servlet.http.HttpSession getSession()
           
 javax.servlet.jsp.el.VariableResolver getVariableResolver()
          This method returns always null because japano resolves Expressions only at JSP compile time
 void handlePageException(java.lang.Exception exception)
           
 void handlePageException(java.lang.Throwable throwable)
           
 void include(java.lang.String str)
           
 void include(java.lang.String str, boolean param)
           
 void initialize(javax.servlet.Servlet servlet, javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, java.lang.String errorPageURL, boolean needsSession, int bufferSize, boolean autoflush)
           
 javax.servlet.jsp.JspWriter popBody()
           
 javax.servlet.jsp.tagext.BodyContent pushBody()
           
 javax.servlet.jsp.JspWriter pushBody(java.io.Writer writer)
           
 void release()
           
 void removeAttribute(java.lang.String str)
           
 void removeAttribute(java.lang.String str, int scope)
           
 void setAttribute(java.lang.String str, java.lang.Object obj)
           
 void setAttribute(java.lang.String str, java.lang.Object obj, int scope)
           
 void setContext(Page page, Buffer out, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Initializes the page context with the actual context.
 void setOut(javax.servlet.jsp.JspWriter out)
          Sets the JspWriter (Buffer) to use for the next complete or partial page generation.
 
Methods inherited from class org.japano.AbstractContext
getCookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context(JapanoConfig japanoConfig)
Creates a new instance of Context

Method Detail

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in class javax.servlet.jsp.PageContext

getSession

public javax.servlet.http.HttpSession getSession()
Specified by:
getSession in class javax.servlet.jsp.PageContext

getRequest

public javax.servlet.ServletRequest getRequest()
Specified by:
getRequest in class javax.servlet.jsp.PageContext

getResponse

public javax.servlet.ServletResponse getResponse()
Specified by:
getResponse in class javax.servlet.jsp.PageContext

setContext

public void setContext(Page page,
                       Buffer out,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
Description copied from class: AbstractContext
Initializes the page context with the actual context. Page context


findAttribute

public java.lang.Object findAttribute(java.lang.String str)
Specified by:
findAttribute in class javax.servlet.jsp.JspContext

forward

public void forward(java.lang.String str)
             throws javax.servlet.ServletException,
                    java.io.IOException
Specified by:
forward in class javax.servlet.jsp.PageContext
Throws:
javax.servlet.ServletException
java.io.IOException

getAttribute

public java.lang.Object getAttribute(java.lang.String str)
Specified by:
getAttribute in class javax.servlet.jsp.JspContext

getAttribute

public java.lang.Object getAttribute(java.lang.String str,
                                     int scope)
Specified by:
getAttribute in class javax.servlet.jsp.JspContext

getAttributeNamesInScope

public java.util.Enumeration getAttributeNamesInScope(int scope)
Specified by:
getAttributeNamesInScope in class javax.servlet.jsp.JspContext

getAttributesScope

public int getAttributesScope(java.lang.String str)
Specified by:
getAttributesScope in class javax.servlet.jsp.JspContext

getException

public java.lang.Exception getException()
Specified by:
getException in class javax.servlet.jsp.PageContext

getOut

public javax.servlet.jsp.JspWriter getOut()
Specified by:
getOut in class javax.servlet.jsp.JspContext

setOut

public void setOut(javax.servlet.jsp.JspWriter out)
Description copied from class: AbstractContext
Sets the JspWriter (Buffer) to use for the next complete or partial page generation.

Specified by:
setOut in class AbstractContext
Parameters:
out - JspWriter (or Buffer)

getPage

public java.lang.Object getPage()
Specified by:
getPage in class javax.servlet.jsp.PageContext

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
Specified by:
getServletConfig in class javax.servlet.jsp.PageContext

handlePageException

public void handlePageException(java.lang.Throwable throwable)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Specified by:
handlePageException in class javax.servlet.jsp.PageContext
Throws:
javax.servlet.ServletException
java.io.IOException

handlePageException

public void handlePageException(java.lang.Exception exception)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Specified by:
handlePageException in class javax.servlet.jsp.PageContext
Throws:
javax.servlet.ServletException
java.io.IOException

include

public void include(java.lang.String str)
             throws javax.servlet.ServletException,
                    java.io.IOException
Specified by:
include in class javax.servlet.jsp.PageContext
Throws:
javax.servlet.ServletException
java.io.IOException

include

public void include(java.lang.String str,
                    boolean param)
             throws javax.servlet.ServletException,
                    java.io.IOException
Specified by:
include in class javax.servlet.jsp.PageContext
Throws:
javax.servlet.ServletException
java.io.IOException

initialize

public void initialize(javax.servlet.Servlet servlet,
                       javax.servlet.ServletRequest servletRequest,
                       javax.servlet.ServletResponse servletResponse,
                       java.lang.String errorPageURL,
                       boolean needsSession,
                       int bufferSize,
                       boolean autoflush)
                throws java.io.IOException,
                       java.lang.IllegalStateException,
                       java.lang.IllegalArgumentException
Specified by:
initialize in class javax.servlet.jsp.PageContext
Throws:
java.io.IOException
java.lang.IllegalStateException
java.lang.IllegalArgumentException

release

public void release()
Specified by:
release in class javax.servlet.jsp.PageContext

removeAttribute

public void removeAttribute(java.lang.String str)
Specified by:
removeAttribute in class javax.servlet.jsp.JspContext

removeAttribute

public void removeAttribute(java.lang.String str,
                            int scope)
Specified by:
removeAttribute in class javax.servlet.jsp.JspContext

setAttribute

public void setAttribute(java.lang.String str,
                         java.lang.Object obj)
Specified by:
setAttribute in class javax.servlet.jsp.JspContext

setAttribute

public void setAttribute(java.lang.String str,
                         java.lang.Object obj,
                         int scope)
Specified by:
setAttribute in class javax.servlet.jsp.JspContext

getExpressionEvaluator

public javax.servlet.jsp.el.ExpressionEvaluator getExpressionEvaluator()
Description copied from class: AbstractContext
This method returns always null because japano resolves Expressions only at JSP compile time

Overrides:
getExpressionEvaluator in class AbstractContext
Returns:
null

getVariableResolver

public javax.servlet.jsp.el.VariableResolver getVariableResolver()
Description copied from class: AbstractContext
This method returns always null because japano resolves Expressions only at JSP compile time

Overrides:
getVariableResolver in class AbstractContext
Returns:
null

getJapanoConfig

public JapanoConfig getJapanoConfig()
Description copied from class: AbstractContext
Returns the japano configuration for the japano website this context is in.

Specified by:
getJapanoConfig in class AbstractContext
Returns:
japano configuration

getErrorData

public javax.servlet.jsp.ErrorData getErrorData()
Overrides:
getErrorData in class javax.servlet.jsp.PageContext

clearPageScope

public void clearPageScope()
Description copied from class: AbstractContext
Removes all attributes of the page scope.

Specified by:
clearPageScope in class AbstractContext

getScopeFromName

public static int getScopeFromName(java.lang.String scope)

pushBody

public javax.servlet.jsp.tagext.BodyContent pushBody()
Overrides:
pushBody in class javax.servlet.jsp.PageContext

pushBody

public javax.servlet.jsp.JspWriter pushBody(java.io.Writer writer)
Overrides:
pushBody in class javax.servlet.jsp.JspContext

popBody

public javax.servlet.jsp.JspWriter popBody()
Overrides:
popBody in class javax.servlet.jsp.JspContext