|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectphp.java.bridge.http.Context
php.java.servlet.Context
public class Context
A custom context which keeps the HttpServletResponse. Used when JSR223 is not available.
Field Summary | |
---|---|
static int |
APPLICATION_SCOPE
Integer value for the level of APPLICATION_SCOPE |
static int |
REQUEST_SCOPE
Integer value for the level of SCRIPT_SCOPE |
static int |
SESSION_SCOPE
Integer value for the level of SESSION_SCOPE |
Fields inherited from interface php.java.bridge.http.IContext |
---|
ENGINE_SCOPE, GLOBAL_SCOPE, JAVA_BRIDGE, SERVLET, SERVLET_CONFIG, SERVLET_CONTEXT, SERVLET_REQUEST, SERVLET_RESPONSE |
Constructor Summary | |
---|---|
Context(javax.servlet.ServletContext kontext,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Create a new context. |
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Retrieves the value for getAttribute(String, int) for the lowest scope in which it returns a non-null value. |
java.lang.Object |
getAttribute(java.lang.String key,
int scope)
Retrieves the value associated with specified name in the specified level of scope. |
java.lang.Object |
getHttpServletRequest()
Deprecated. Use java_context()->getAttribute(...) instead |
java.lang.Object |
getHttpServletResponse()
Deprecated. Use java_context()->getAttribute(...) instead |
java.lang.Object |
getServlet()
Deprecated. Use java_context()->getAttribute(...) instead |
java.lang.Object |
getServletConfig()
Deprecated. Use java_context()->getAttribute(...) instead |
java.lang.Object |
getServletContext()
Deprecated. Use java_context()->getAttribute(...) instead |
java.io.Writer |
getWriter()
Retrieves an instance of java.io.Writer which can be used by scripts to display their output. |
Methods inherited from class php.java.bridge.http.Context |
---|
call, getAttributesScope, removeAttribute, setAttribute |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int REQUEST_SCOPE
public static final int SESSION_SCOPE
public static final int APPLICATION_SCOPE
Constructor Detail |
---|
public Context(javax.servlet.ServletContext kontext, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
res
- The HttpServletResponseMethod Detail |
---|
public java.lang.Object getAttribute(java.lang.String key, int scope)
IContext
getAttribute
in interface IContext
getAttribute
in class Context
key
- the name of the attributescope
- the level of scope
public java.lang.Object getAttribute(java.lang.String name) throws java.lang.IllegalArgumentException
IContext
getAttribute
in interface IContext
getAttribute
in class Context
name
- the name of the attribute
java.lang.IllegalArgumentException
public java.io.Writer getWriter() throws java.io.IOException
IContext
getWriter
in interface IContext
getWriter
in class Context
java.io.IOException
public java.lang.Object getHttpServletResponse()
getHttpServletResponse
in class Context
public java.lang.Object getHttpServletRequest()
getHttpServletRequest
in class Context
public java.lang.Object getServlet()
public java.lang.Object getServletConfig()
public java.lang.Object getServletContext()
getServletContext
in class Context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |