Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3353360
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:08:30+00:00 2026-05-18T02:08:30+00:00

So I want to write a servlet which uploads a video to a youtube

  • 0

So I want to write a servlet which uploads a video to a youtube channel using the Java API, but I can’t seem to find a way of specifying that I want to go through a proxy server. I’ve seen an example on this site where someone managed to do this using C#, but the Classes they used don’t seem to exist in the Java API. Has anybody managed to successfully do this?

YouTubeService service = new YouTubeService(clientID, developerKey);

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:08:31+00:00Added an answer on May 18, 2026 at 2:08 am

    I’m new here so I’m unable to comment on posts (and a little late on this topic), but Jesper, I believe this is the C# sample that the original poster was talking about: How to upload to YouTube using the API via a Proxy Server

    I can see no “direct” way of porting that example to Java though, since the GDataRequestFactory doesn’t seem to have any proxy-related fields.

    I was also having issues with the Java client Library with proxy in our application. Basically, the library picks up the global Java proxy settings:

    System.getProperty("http.proxyHost");
    System.getProperty("http.proxyPort"); 
    

    but for some reason not everywhere. To be more precise, even with a proxy server properly configured in Java, YouTube authentication (calling service.setUserCredentials(“login”, “pwd”)) would use a direct connection and ignore the proxy. But a video upload (calling service.insert(…)) would use the proxy correctly.

    With the help of folks at the official YouTube API mailing list, I was able to nail this down. The issue is that the authentication is performed using SSL (HTTPS) and since there is a different set of properties for the HTTPS proxy, this didn’t work. The fix is to simply set https.proxy* properties as well (in addition to http.proxy*), so that these point to a valid proxy server too:

    System.getProperty("https.proxyHost");
    System.getProperty("https.proxyPort"); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a simple servlet in JBoss which will call a method
I want to know how to write Intercepting Filter Pattern like Java's servlet filter
I'm using Java Logging API in a simple Servlet application that uses Maven and
I'm implementing a long poll http connection using java servlet. How can I know
I want to write a JAR file that makes use of the javax servlet
I want write a little code analyzer which parses nested structures and translates into
Hello I want write my own desktop sharing application in Java. The application should
I want to write a syntax highlighting extension for Emacs, but I Googling of
I want to write a simple web framework myself using WSGI, Python. I am
I wrote custom servlet in Liferay and want to know which user page calls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.