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

  • Home
  • SEARCH
  • 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 4083936
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:22:34+00:00 2026-05-20T18:22:34+00:00

I create a service that post something through the internet and everything’s fine. But

  • 0

I create a service that post something through the internet and everything’s fine. But when I deploy it to our server I get connection status:403, forbidden. I think it is because our server won’t allow direct access to the internet without login first. We have to login first in the browser with our username/password to access the internet.

I notice that if I have login and access the internet in the server, the service I deploy run alright. But I don’t think it’s practical because in that case my service won’t run if someone or I don’t login first.

I have tried setting the proxy in the java code but to no avail. Could someone help me with this problem? Here is I post my service snippet.

System.getProperties().put("http.proxySet", "true");
System.getProperties().put("http.proxyHost", myHost);
System.getProperties().put("http.proxyPort", "8080");
System.getProperties().put("http.proxyUser", myUser);
System.getProperties().put("http.proxyPassword", myPassword);
System.getProperties().put("http.nonProxyHosts", "localhost|127.0.0.1");

try {
            URL url = new URL(urlAddress);
            HttpURLConnection con = (HttpURLConnection) url.openConnection();          
            con.setRequestMethod("POST");
            con.setDoOutput(true);
            con.setDoInput(true);  

            ...

            if (con.getResponseCode() == HttpURLConnection.HTTP_OK) {
                System.out.println("connection OK");
                istrm = con.getInputStream();
                if (istrm == null) {
                    System.out.println("istrm == null");
                }

                ...

            } else {
                System.out.println("Response: " + con.getResponseCode() + ", " + con.getResponseMessage());
            }
}

And my process goes to else block and gets response message 403

  • 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-20T18:22:35+00:00Added an answer on May 20, 2026 at 6:22 pm

    Try using System.setProperty(String, String) instead.

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

Sidebar

Related Questions

I am trying to create something with extbase, but the error-message I get is
I need to create a service that will be called back by a third
I have a WCF service that works ok if I create the service without
Here is what I have in mind: 1) Create a service that will run
Anybody knows how to do this? I need to create a service that will
We are trying to create a web-service that we plan to pass a variable
I am trying create a WCF service that leverages the WPF MediaPlayer on the
I am trying to create an OSGi service that wraps another jar. I added
Hi I want to create a WCF service that have login method, which is
i'd like to create a windows service that would be accessible via WCF from

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.