I'm sorry I didn't make it clear enough. I do not want to access the
parameters. I would like to access all attributes of a request (i.e.
remote host, request uri, headers, etc) and I thought Struts2 would wrap
that up in a servlet independent map so I don't have to depend on
Servlet specific
Thilo Ettelt wrote:
I'm sorry I didn't make it clear enough. I do not want to access the
parameters. I would like to access all attributes of a request (i.e.
remote host, request uri, headers, etc) and I thought Struts2 would wrap
that up in a servlet independent map so I don't have to depend
Hey,
somehow I can't find a way to access the RequestMap from within an
Interceptor. What is the right way?
- Thilo
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thilo,
You can directly access an HttpServletRequest in the Interceptor using
following -
ActionContext ac = invocation.getInvocationContext();
HttpServletRequest request = (HttpServletRequest)
ac.get(ServletActionContext.HTTP_REQUEST);
- Omkar
Thilo Ettelt wrote:
Hey,
From ServletConfigInterceptor:
final Object action = invocation.getAction();
final ActionContext context =
invocation.getInvocationContext();
if (action instanceof ServletRequestAware) {
HttpServletRequest request = (HttpServletRequest)
context.get(HTTP_REQUEST);
((ServletRequestAware)
Yes, I know :) But I don't want to depend on HttpServletRequest. I would
like to have the Request*Map*. Unfortunetely from looking at the code I
only found out how to contruct a RequestMap from a HttpServletRequest.
Isn't there some kind of function that provides me with the Map? (Except
the
Thilo Ettelt wrote:
Yes, I know :) But I don't want to depend on HttpServletRequest. I would
like to have the Request*Map*. Unfortunetely from looking at the code I
only found out how to contruct a RequestMap from a HttpServletRequest.
Omkar showed you how to get to the invocationContext().
7 matches
Mail list logo