Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to interact with a website

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
0
0
US
Hello all,

I am taking a HUGE bite into java by doing this (still relatively new). I am looking for some more direction. We have this web application that we want to interact with from another program. We are asking the vendor for a list of APIs, but are progressing with reverse-engineering the process to see if it will work.

I have been playing with the HttpURLConnection class to log-in and interact with a web application. Well, we have come to a problem. It seems for every URL change we have to create a new connection, so we loose any session information. (That is my thoery anyway). What we need to do is log in via a form, then grab a new page to retrive a variable and submit the form on the page to add the information. My problem is keeping the log in information, I keep on getting an invalid user error on the second page.

Do you have any ideas? I don't see anything in the API docs. I will be still googling, but I am hoping someone can point me in the right direction.

Thanks for any suggestions, iSeriesCodePoet
IBM iSeries (AS/400) Programmer
[pc2]
 
You will have to explicitly set the session identifer in the header everytime that you reconnect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top