It would be nice to be able to resolve a relative path from with a custom processor - if I'm not mistaken, having access to the servlet context could provide this? Or be able to read an initialization parameter from web.xml.
Hi Bob,
If you just need this path, maybe you don't have to create a custom processor, as the request generator can perhaps provide you with the information you need (see http://www.orbeon.com/oxf/doc/processors-generators#N1001A). Look in particular at the <request-path> and <context-path> elements.
In your custom processor, you can get the HTTP request from a custom processor with:
HttpServletRequest request = (HttpServletRequest) context.getAttribute(PipelineContext.REQUEST);
I have attached the Javadoc for the PipelineContext class. Note that this is a private API and that it is subject to change in future versions of OXF.
Alex Title: PipelineContext
org.orbeon.oxf.processor.pipeline
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Nested Class Summary | |
static interface |
PipelineContext.ContextListener
|
| Field Summary | |
static java.lang.String |
FILTER_CHAIN
|
static java.lang.String |
INSPECTOR_RUN
|
static java.lang.String |
JDBC_CONNECTION
|
static java.lang.String |
JNDI_CONTEXT
|
static java.lang.String |
LOCATION_DATA
|
static java.lang.String |
OUTPUT_STREAM
|
static java.lang.String |
PARENT_PROCESSORS
|
static java.lang.String |
REQUEST
|
static java.lang.String |
RESPONSE
|
static java.lang.String |
SERVLET_CONTEXT
|
static java.lang.String |
THROWABLE
|
static java.lang.String |
WRITER
|
| Constructor Summary | |
PipelineContext()
|
|
| Method Summary | |
void |
addContextListener(PipelineContext.ContextListener listener)
|
void |
destroy(boolean success)
|
java.lang.Object |
getAttribute(java.lang.Object key)
|
void |
setAttribute(java.lang.Object key,
java.lang.Object o)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
REQUEST
public static final java.lang.String REQUEST
- See Also:
- Constant Field Values
RESPONSE
public static final java.lang.String RESPONSE
- See Also:
- Constant Field Values
FILTER_CHAIN
public static final java.lang.String FILTER_CHAIN
- See Also:
- Constant Field Values
SERVLET_CONTEXT
public static final java.lang.String SERVLET_CONTEXT
- See Also:
- Constant Field Values
WRITER
public static final java.lang.String WRITER
- See Also:
- Constant Field Values
OUTPUT_STREAM
public static final java.lang.String OUTPUT_STREAM
- See Also:
- Constant Field Values
JDBC_CONNECTION
public static final java.lang.String JDBC_CONNECTION
- See Also:
- Constant Field Values
JNDI_CONTEXT
public static final java.lang.String JNDI_CONTEXT
- See Also:
- Constant Field Values
PARENT_PROCESSORS
public static final java.lang.String PARENT_PROCESSORS
- See Also:
- Constant Field Values
THROWABLE
public static final java.lang.String THROWABLE
- See Also:
- Constant Field Values
INSPECTOR_RUN
public static final java.lang.String INSPECTOR_RUN
- See Also:
- Constant Field Values
LOCATION_DATA
public static final java.lang.String LOCATION_DATA
- See Also:
- Constant Field Values
| Constructor Detail |
PipelineContext
public PipelineContext()
| Method Detail |
setAttribute
public void setAttribute(java.lang.Object key,
java.lang.Object o)
getAttribute
public java.lang.Object getAttribute(java.lang.Object key)
addContextListener
public void addContextListener(PipelineContext.ContextListener listener)
destroy
public void destroy(boolean success)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
