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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:28:20+00:00 2026-06-16T22:28:20+00:00

I created application that runs on GAE and connects to specific page, automatically logins

  • 0

I created application that runs on GAE and connects to specific page, automatically logins to this page and AFTER login I want to receive html and process it.

here is the problematic (writer.write part and connection.connect()) part of code:

        this.username = URLEncoder.encode(username, "UTF-8");
        this.password = URLEncoder.encode(password, "UTF-8");
        this.login = "login";

        connection = (HttpURLConnection) url.openConnection();
        connection.setDoOutput(true);
        connection.setRequestMethod("POST");

        OutputStreamWriter writer = new OutputStreamWriter(
                connection.getOutputStream());
        writer.write("str_login=" + login + "&str_user=" + username
                + "&str_pass=" + password);
        writer.close();

        connection.connect();

I am getting IOException (connection.connect()) while establishig connection. Problem is “application/x-www-form-urlencoded” data. When I pass wrong parameters to page (for example str_pasSSs, str_usernaAAme, or no parameters at all) I am not possible to login but I do get response with html of login page. So, it seems that Google App Engine does not support this kind of communication. Is it possible to login to this page in some other way that GAE supports?

In Wireshark, I saw that username and password are sent in plaintext as line-based text data (application/x-www-form-urlencoded). I know this is not safe, but it’s the way it is.

  • 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-16T22:28:21+00:00Added an answer on June 16, 2026 at 10:28 pm

    The connection is already established implicitly when you call getOutputStream(). There is no need to call connection.connect() again.

    Also, instead of closing the output writer, try flush() instead.

    As a best practice, you should be closing in, out and conn in a finally block:

    InputStream in = null;
    OutputStream out = null;
    HttpUrlConnection conn = null;
    
    try {
      ...
    } catch (IOException ioe) {
      ...
    } finally {
      if (in!=null) {try {in.close()} catch (IOException e) {}}
      if (out!=null) {try {out.close()} catch (IOException e) {}}
      if (conn!=null) {try {conn.close()} catch (IOException e) {}} 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created an application that parses content of secured areas of one webpage after
I have created an application that uses settings.settings to store some user specific settings
I have created a Mac OS X helper application that always runs under root.
I created a Windows Qt C++ application that performs some SQL queries. This application
I have a silverlight application that runs WCF services. I have created a WCF
I'm new to WPF, and created a 1st simplistic WPF application that I want
I created a web application that is using Java Media Framework. It runs in
I have created a small php script locally that runs a java application in
I have created an application that runs in the taskbar. When a user clicks
I created a Visual Basic 6 application that runs without a hitch on my

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.