I am having a doubt with servlet filter.
If a user enters Google in browser i need to intercept the user request using filter and send the reuest through my server and the same if the resoponse comes from the server i need to intercept the response and i want to add something in the response and send the response back to the client..
By using the servlet filter we can do this.But i don know how to redircect the user request to my application server..
I am using apache tomcat and eclipse.
can any one give me an idea..thanks in advance..
That call to Google from the client browser will go nowhere near your website server...so you have no chance of intercepting it.
then what is the way to do that..
I was subtly implying that your requirements are not possible.
Put it this way...client is viewing your website, each click on a link that refers to your website goes to the server serving that website (and any relevant servlets, interceptors, whatever). Client now types in "www.google.com" into their browser...this call goes nowhere near your server, it goes to one of Googles servers.