This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If a user enters www.google.com 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..
Thats impossible. If you do that it will come under security violation :-)
If you were owning the www.google.com domain you could add an interceptor.
A simplest form of interceptor can be like,
suppose you have an application hosted on your server. You want to log all input requests and outgoing responses from your service.. You can add an interceptor to log the request and response without disturbing your service application.
What part of "this cannot be done" did you find confusing? There is no way that you can intercept traffic to google or any other site that you do not own the DNS rights to.
Joined: Oct 06, 2010
I am not intercepting some others.This is the situation if i am entering google in my browser before it google reaches the server i need to forward that request to my proxy and send it to corresponding server.And again if the response comes from the server first it must come to my proxy server and then i need to add something in that response and send that to server..
This is the one that i want to do.Can you have any idea?
You'd have to modify your browser in some way. It's impossible to do this to a random person of your choosing without their permission. You can configure your browser to communicate through a proxy by modifying its settings. For example, in Firefox, go to [Preferences > Advanced > Network > Settings].
SCJP 6 || SCWCD 5
Joined: Oct 06, 2010
I dont want to do it for random person.I am doing for myself only.