This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

httpurlconnection and asp websites  RSS feed

 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
has anybody experienced logging in to an asp website using httpurlconnection?

i haven't had problems with php-based websites but asp is another story. im not sure if there is something else that needs to be added to the httpurlconnection.

anyone done this before? do share. thank you
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many times, without any additional configuration or problems. So why don't you TellTheDetails and tell what's exactly going wrong?
 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
will post back with working sample code
 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok so here's my working code. this is the same code i use to access php based sites and i have had no problems. just the asp sites im having problems

there are 2 classes

CookieTool - handles the cookie
App - the application

notice that when you login, and i access a new URL after logging in, the contents i get from that page is the same as the login form. you may have to create a new account to test the login. any inputs greatly appreciated.
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, cookies...

You may want to consider a more high level library such as Apache's HttpClient. It does a lot of the hard work for you.
 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok thanks
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!