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 8073453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:20:44+00:00 2026-06-05T14:20:44+00:00

I have a wireless IP camera and I want to make my own web

  • 0

I have a wireless IP camera and I want to make my own web page to show its live stream.
The address of the stream is "http://192.168.1.2:8082/index.cgi" (supposed) and it requires User authentication. This means that when we enter the above URL in browser it asks for username and password.

All what I want is that to make a java applet, on loading the java applet, it should authenticate the URL and show the image/stream.

This is the situation, now the basic problem is that

Q: How to do Http authentication in Java applet?

I shall be thankful for every answer.

  • 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-06-05T14:20:45+00:00Added an answer on June 5, 2026 at 2:20 pm

    You can achieve it by making an HttpURLConnection and appending username and password with the URL. As:

    URL myURL = new URL("http://192.168.1.2:8082/index.cgi?username=user&password=");
    HttpURLConnection myConnection = (HttpURLConnection) myURL.openConnection();
    myConnection.setDoOutput(false);
    int status = ((HttpURLConnection) myConnection).getResponseCode();
    

    Alternatively (instead of appending username/password to url), you can try( not sure if it is allowed in Applet) setting the default authenticator for http requests like this:

    Authenticator.setDefault (new Authenticator() {
        protected PasswordAuthentication getPasswordAuthentication() {
            return new PasswordAuthentication ("username", "password".toCharArray());
        }
    });
    

    You can also use Apache HttpComponents HttpClient which is very easy to use. To know more about how HTTP requests work in Java, see this answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net web-page application and i want it to be accessed using
http://www.devx.com/wireless/Article/39101/0/page/2 I have followed this tutorial and got it to work and everything. now
I have seen the following links before posting this question http://www.devx.com/wireless/Article/40792/1954 Saving Android Activity
Assuming I have an Amazon product URL like so http://www.amazon.com/Kindle-Wireless-Reading-Display-Generation/dp/B0015T963C/ref=amb_link_86123711_2?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-1&pf_rd_r=0AY9N5GXRYHCADJP5P0V&pf_rd_t=101&pf_rd_p=500528151&pf_rd_i=507846 How could I scrape
I have two git repositories: git_repo_A: https://github.com/gnychis/coexisyst git_repo_B: https://github.com/gnychis/android-wireless-monitor I want to move everything
Recently I bought a Foscam wireless IP camera: http://www.foscam.com/Products_List.asp?id=173 In my home, my laptop
I have created iphone bluetooth chat application using following tutorial:http://www.devx.com/wireless/Article/43502/1954. It works well.But when
I have a text file that contains meta-urls in the following form: http://www.xyz.com/.*services/ http://www.xyz.com/.*/wireless
I have an older desktop computer that I want to use for web development.
I have two network interfaces(Wireless and Ethernet) for connection but I just want to

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.