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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:41:14+00:00 2026-05-20T05:41:14+00:00

So I got this situation and I may have 2 different routes to take.

  • 0

So I got this situation and I may have 2 different routes to take. The thing is I have to update some information I generate, already formatted and parsed and ready to be displayed. Now I don’t know how to input this txt file (or giant string) into the site. One way to do it is to find a way for Java to interact with the page, paste the info in the text area and Save/Submit the update. The other way is to edit the page file itself inserting the giant string in the place it’s supposed to go. I’ve been researching about HTTP Forms, but most are used with third party libraries. But I have no idea how to do either route. Ive been checking these sites, and other, but I think some are too complex or need external libraries like Selenium, and I really have no experience using URLConnection class. Thanks for the help!

–I don’t have control of the server, I can simply access it, so I was thinking that the first idea would be more practical…

http://kspace.in/blog/2008/05/30/submit-html-form-using-java/

http://www.devcomments.com/q450155/How-to-have-Java-application-interact-with-website

  • 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-20T05:41:15+00:00Added an answer on May 20, 2026 at 5:41 am

    Use HTTP Post:

    http://www.exampledepot.com/egs/java.net/post.html

    try {
        // Construct data
        String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8");
        data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
    
        // Send data
        URL url = new URL("http://hostname:80/cgi");
        URLConnection conn = url.openConnection();
        conn.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
        wr.write(data);
        wr.flush();
    
        // Get the response
        BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        while ((line = rd.readLine()) != null) {
            // Process line...
        }
        wr.close();
        rd.close();
    } catch (Exception e) {
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got this strange situation going on. Imagejpeg is only working when I define
I've got a problem with this situation (i'll try to make it easier) -
I've got a situation like this: Table: FunTable ItemKey ItemName ItemPriceEffectiveDate ItemPrice 11 ItemA
I've got the following situation: <h2>This text is <span>pretty awesome</span></h2> I'm trying to give
I have a situation where I need to write some unit tests for some
I've got a rather interesting situation. I have a SQLite database full of addresses
I got a config/routes.rb file like this: map.resources :categories, :shallow => true do |cat|
I came across this problem,I have got an algorithm that I need to implement
Got this error message while trying to load view: The model item passed into
Got this line of code here but its not working. private void Button_Click(object sender,

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.