Main Contents
September 3, 2007
Servlet thorough a proxy server
Finally I found how to make a servlet go through the UTS proxy server for it to access YouTube.
My web application (to be available online soon...) calls a Java servlet that does HTTP requests to YouTube server. See YouTube Developer Area for more information. There are nice example web apps.
I had a proxy problem ... well not really a problem, but it was a problem for me due to my lack of knowledge. While the process takes about 2 minutes without the proper setting, it only takes 200 msec with the appropriate setting. The URL should be set as below:
URL url = new URL("http", proxyHost, proxyPort, youtubeGetVideoByTagString);
... This is to make a Java servlet use a specific proxy server.
- by shige+ki
- at 23:28
- in Java