• Post Reply Bookmark Topic Watch Topic
  • New Topic

Logging into a forum  RSS feed

 
Ryan Miller
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I need to make a java project that uses a urlConnection so I picked logging into a forum. I need to send an http post request to a site and then test to see if I'm logged in. This is a snippet of the code. This piece should login by sending the post data to http://forum.tip.it/index.php?app=core&module=global§ion=login but when it reads the html of the next page, it just prints out the login page so either I'm doing something wrong or it needs to log/send the cookies that the site sends. Any input would be greatly appreciated. Thanks.

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The details will depend on what the site expects, but the proper approach at trouble-shooting this would be to compare what gets sent by the web page vs. what gets sent by your code. An HTTP proxy like tcpmon can be very helpful for that.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!