Re: [s2] How can I access the RequestMap from an Interceptor?

2007-11-15 Thread Thilo Ettelt
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

Re: [s2] How can I access the RequestMap from an Interceptor?

2007-11-15 Thread Gary Affonso
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

[s2] How can I access the RequestMap from an Interceptor?

2007-11-14 Thread Thilo Ettelt
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]

Re: [s2] How can I access the RequestMap from an Interceptor?

2007-11-14 Thread Omkar patil
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,

Re: [s2] How can I access the RequestMap from an Interceptor?

2007-11-14 Thread Dave Newton
From ServletConfigInterceptor: final Object action = invocation.getAction(); final ActionContext context = invocation.getInvocationContext(); if (action instanceof ServletRequestAware) { HttpServletRequest request = (HttpServletRequest) context.get(HTTP_REQUEST); ((ServletRequestAware)

Re: [s2] How can I access the RequestMap from an Interceptor?

2007-11-14 Thread Thilo Ettelt
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

Re: [s2] How can I access the RequestMap from an Interceptor?

2007-11-14 Thread Gary Affonso
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().