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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:49:40+00:00 2026-06-11T12:49:40+00:00

My issue is in my title,also I will give java code and detail. void

  • 0

My issue is in my title,also I will give java code and detail.

void getSourceCode(String text_url){

    String source_code="";
    BufferedReader reader = null;

    try {
          reader = new BufferedReader(new InputStreamReader((new URL(text_url)).openStream(), Charset.forName("UTF-8")));
          String inputLine;
          while ((inputLine = reader.readLine()) != null) {
            source_code+=inputLine.replace(" ", "");
          }
    } 

    catch (Exception e) {
        e.printStackTrace();
    } 

    finally {
          if (reader != null) {
                try {
                  reader.close();
                } 
                catch (IOException e) {
                  e.printStackTrace();
                }
          }
    }

    System.out.println( source_code );
}

For example,I send “http://ekenlermangalkomuru.com/urunlerimiz/liste/144/BinarKömürü” as the parameter via html a href=”…” parsing but the error report is :

java.io.IOException: Server returned HTTP response code: 400 for URL:
http://ekenlermangalkomuru.com/urunlerimiz/liste/144/BinarKömürü
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)

The link works on all browsers but when I tried to connect via java code it doesnt work.How I can I solve ? Thanks for all advices..

  • 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-11T12:49:41+00:00Added an answer on June 11, 2026 at 12:49 pm

    Error 400 means that the request is malformed so that the server is unable to process it. Are you sure that you have properly URL encoded the request URL? For something like: http://ekenlermangalkomuru.com/urunlerimiz/liste/144/BinarKömürü, at least ö and ü are not ASCII letters and need to be encoded to create a well-formed request.

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

Sidebar

Related Questions

It was as hard to write a good title for this issue as it
I could barely find a reasonable title that would explain my issue, let alone
So the title is a little confusing, I think, but here's the issue: I
As the title states, I am looking for something, that will help me automate
I have an issue trying to persist entities to the DB using code-first technique.
Perhaps not the best title explanation. I have an issue I am trying to
I am able to display song tile fetched from local sd card.The issue is
I'm having an issue here, I am trying to get all the titles from
issue facing while loading the messages in to mq channel, recieving an error like
Issue: RODBC (falsely) returning zero rows Situation: I'm using RODBC to connect to a

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.