• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

POST Request Java

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi every one.

I really stack on this issue. I am making a code that makes POST Request to a server with username and password as a parameter. I dont know why i am getiing 500 error. Here is the code, Please check it for me.

This is what i did.
1. First i send GET request and read the header of the HTTP response to
get the CookieName and CookieValue. This is working.

2. Then i create another HTTP connection to do the post Request, But
this time since it is a new connection the server generates NEW and
different Cookie(To be exact NEW session_ID)from the first one. So I am
sending NEW Request with the OLD session_ID. And i have to create a NEW
connection for ever Request i made, so i cant do both the GET and post
Requests with one Connection.

This one is my potential problem.

1. Do you think i can do the POST request without the Cookie sent again, based on the server login detail below?
2. If not, how can i do the POST request with the connection i created to read theheader(two requests with just one HTTP connection)?
3. The result i am getting is 500 error, Do you think the problem is ONLY from ther server side?
4. Finally What does it mean if i get "Wrong Username and password " message, does that mean surely my post request does work ?
Thank you!

Here is the Login deatail of the server, python based





And here is the source of the login page.





 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic