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 on Servlet specific stuff.

Oh!  Those are called the HTTP Request Headers.

Does it make sense to be servlet independent in this case anyway?

Not really.

The request headers (uri, browse agent, etc) are a property *of* an HTTP request.

Of course, you could argue that it doesn't make a ton of sense to put an additional layer of abstraction on top of the parameters either. Or the Session.

XWork (which sits at the core of Struts2) had this idea that it would be an "abstract" action framework with implementations for various protocols (HTTP, obviously, but maybe FTP?). I don't think that idea really panned out, the vast majority of its use (that I see) is for processing HTTP requests.

But that's why you see what you see. The parameter map is non-http-specific with the idea that different protocols might have a similar notion of "parameters" but different underlying implementation. Same thing with the "Session" Map that's available from the ActionContext.

But, to my knowledge, no similar abstraction/wrapper was done for the idea of a "Request Header". As far as I know, if you want the headers, you get them from the from the raw HTTPRequest object.

- Gary

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to