How to validate or parse HTTP request headers ( tomcat version 6.0.18 )

2014-01-14 Thread kalasareddy lingaraja
Hi

i have task to validate or parse following http header

Accept
Accept-Charset
Accept-Encoding
Accept-Language
Accept-Datetime
Content-Length
Content-MD5
Content-Type

lets take  Accept-Language as an example , if header language comes other
than en-us i should reject the request with customized code response.

let me know ways to achieve the task?

can we do with any configuration files ?

we are using tomcat  6.0.18

waiting for earliest replay


Re: How to validate or parse HTTP request headers ( tomcat version 6.0.18 )

2014-01-14 Thread kalasareddy lingaraja
yes i did it, but thing is that after parsing request in filter: if it is
success then i should redirect the request to web service which running in
embedded tomcat instance,

could you help me how to shift control to web service from filter


On Tue, Jan 14, 2014 at 11:10 PM, André Warnier a...@ice-sa.com wrote:

 kalasareddy lingaraja wrote:

 Hi

 i have task to validate or parse following http header

 Accept
 Accept-Charset
 Accept-Encoding
 Accept-Language
 Accept-Datetime
 Content-Length
 Content-MD5
 Content-Type

 lets take  Accept-Language as an example , if header language comes other
 than en-us i should reject the request with customized code response.

 let me know ways to achieve the task?

 can we do with any configuration files ?

 we are using tomcat  6.0.18

 waiting for earliest replay


 Have a look at the URLRewriteFilter, here : http://tuckey.org/urlrewrite/

 Or, if this is a school exercise, then you'll have a bit more reasearch
 and work to do yourself, to write your own servlet filter to do the job.



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org