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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:11:20+00:00 2026-05-24T04:11:20+00:00

after executing post method on the server i get this error: HTTP/1.1 302 Found,

  • 0

after executing post method on the server i get this error: HTTP/1.1 302 Found, which as i know states that there is a redirect that follows. I am trying to fill in the logon form and post it to server, after doing so, i get this redirect.

P.S. The form submit method is postback.. maybe this is a key?

P.P.S. After posting this:

__VIEWSTATE=&__EVENTTARGET=&__EVENTARGUMENT=&ctl00$tbUsername=qwerty&ctl00$tbPwd=qwerty&ctl00$chkRememberLogin=0&ctl00$cmdLogin=Login&ctl00$cmdForgetMe=Forget Me

I get this:

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="http://website/mobile/(X(1)S(lyslolvcdq13af45juum2vel))/Login.aspx?ReturnUrl=%2fsyspower3%2fmobile%2fdefault.aspx&amp;AspxAutoDetectCookieSupport=1">here</a>.</h2>
</body></html>

Plus the set of headers:

08-02 13:48:39.084: INFO/System.out(1853): ====Header=====
08-02 13:48:39.084: INFO/System.out(1853): Cache-Control
08-02 13:48:39.084: INFO/System.out(1853): private
08-02 13:48:39.084: INFO/System.out(1853): ====Header=====
08-02 13:48:39.084: INFO/System.out(1853): Content-Type
08-02 13:48:39.084: INFO/System.out(1853): text/html; charset=utf-8
08-02 13:48:39.093: INFO/System.out(1853): ====Header=====
08-02 13:48:39.093: INFO/System.out(1853): Expires
08-02 13:48:39.093: INFO/System.out(1853): Tue, 02 Aug 2011 13:48:33 GMT
08-02 13:48:39.093: INFO/System.out(1853): ====Header=====
08-02 13:48:39.093: INFO/System.out(1853): Server
08-02 13:48:39.093: INFO/System.out(1853): Microsoft-IIS/7.5
08-02 13:48:39.093: INFO/System.out(1853): ====Header=====
08-02 13:48:39.093: INFO/System.out(1853): Set-Cookie
08-02 13:48:39.093: INFO/System.out(1853): ASP.NET_SessionId=ebmsrf45wb3mcq45qrgrfe55; path=/; HttpOnly
08-02 13:48:39.093: INFO/System.out(1853): ====Header=====
08-02 13:48:39.104: INFO/System.out(1853): X-AspNet-Version
08-02 13:48:39.104: INFO/System.out(1853): 2.0.50727
08-02 13:48:39.104: INFO/System.out(1853): ====Header=====
08-02 13:48:39.104: INFO/System.out(1853): X-Powered-By
08-02 13:48:39.104: INFO/System.out(1853): ASP.NET
08-02 13:48:39.104: INFO/System.out(1853): ====Header=====
08-02 13:48:39.104: INFO/System.out(1853): Date
08-02 13:48:39.104: INFO/System.out(1853): Tue, 02 Aug 2011 13:48:33 GMT
08-02 13:48:39.104: INFO/System.out(1853): ====Header=====
08-02 13:48:39.104: INFO/System.out(1853): Content-Length
08-02 13:48:39.104: INFO/System.out(1853): 1272

EDITED:
Now i can see the new location that I must proceed to. But here is a new problem, when i enter this new link into the browser, i get into the server(i pass login), but if I do a new request(POST) to server, then i am being thrown back to the login page…

P.S. Now i am using HttpURLConnection for the post method

  • 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-24T04:11:20+00:00Added an answer on May 24, 2026 at 4:11 am

    That’s not an error. That’s just an informal message that there’s a redirect. Only HTTP 4nn and 5nn responses are real errors. The redirect URL is available in the HTTP Location header. You, as being a web client, are obligated to send a new GET request on the URL as specified in the HTTP Location header.

    String location = response.getLastHeader("Location").getValue();
    // ...
    

    Update: So, you got a HTTP 302 response without a Location header? What’s the status code of the response itself?

    int statusCode = response.getStatusLine().getStatusCode();
    

    If this is 200 and the body contains a 302 message, then it’s definitely a bug in the server side. The webserver should have returned a status code of 302 along with a Location header.


    Update 2: So, the status code is actually 200. That’s a bug in the server side. If that website is not under your control and thus you cannot fix the server, then you need to report it to the admin/maintainer of the website. In the meanwhile, best what you could do is to extract the new location from the response body using some HTML parser and then send a new GET request on it. For example, using Jsoup:

    String location = Jsoup.parse(responseHtml).select("h2 a").first().attr("href");
    // ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a method that calls stored procedure and returns the data after executing
How to get effective HTML after executing all scripts? Actually scripts are adding and
How can I render after executing an action in a restful controller instead of
I'm building an application in Java to retrieve data from MySQL database. After executing
I'd like my .NET Compact Framework app to delete itself after it finishes executing.
When executing SubmitChanges to the DataContext after updating a couple properties with a LINQ
After reading this question , I was reminded of when I was taught Java
After being told by at least 10 people on SO that version control was
After lots of attempts and search I have never found a satisfactory way to
My first post here, please be gentle. =) I work for a company that

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.