|
|
Accessing from Request Attributes on start
Hi Guys,
I have a requirement whereby I need to extract fromRequest information like request attributes when my flow starts (before any views are rendered).
Does anyone know if this is possible? I tried passing in an externalContext and flowRequestContext in my flow (like the below), and then trying to drill down into that object to find my request attributes.
But it seems like its not possible to access these values or perhaps my original request is lost when webflow initializes? Has anyone come across this?Code:
lt;on-startgt;lt;evaluate expression =quot;action.examineRequest(flowRequestContext)quot;gt;
lt;/on-startgt;
Then in that method accessing the request as follows: Code:
fromServletRequest request = (fromServletRequest)rCtx.getExternalContext().getNativeContext();
Thanks for any help!
Is it portlet or servlet?
got a bit further now, and some more background:
It's a servlet. I set some request attributes at this point and then forward (RequestDispatcher) to a ucl (which is a ucl of a flow).
My flow is protected using spring security. The intercepting filter that is invoked after the servlet forwards the request is a subclass of AbstractPreAuthenticatedProcessingFilter. In the getPreAuthenticatedCredentials method of this class the request attributes are lost. By lost I mean the fromServletRequest that is passed to this method does not have my attributes. I think this might be the root of my problem.
I implemented a FlowExecutionListener class to check the RequestContext in the sessionCreating method and everything appears fine in there (I can see my request attributes). I can then extract the attributes from here and put them into the session, which are then available throughout the flow but I was wondering why my request attributes are lost when the request is passes to my AbstractPreAuthenticatedProcessingFilter implementation! |
|