Re: Maintaining sessions with URL



Dev wrote:
Greetings,

It seems to be puzzle for me but I am sure such kind of requests could
have been handled and addressed. This is my requirement:

Manual Steps currently followed:
1. Supply the ISBN number and click OK
2. the web page returns list of books (if the ISBN number is partly
entered)
3. click on the desired list
4. the web page returns the details of the book like book name, etc

We have a requirement to validate around 50000 ISBN and doing it
manually will be laborious. Hence I thought it could be automated.

This was my approach:
1. Create URL String with Post data
2. open the URLConnection
3. read the returned web page and get the total count of books
returned
4. create another URL string and open the url connection
5. read the web page and parse the details

Until Point 3, I was able to accomplish. However, when another
connection was established, the returned page was session expired.

I should bascially use the same URL object to repost or redirect to
the server with my second URL. Not sure how I could accomplish
Please help!

The code snippet which is abridged version.

[snip]
Look into using HttpClient from apache commons. It has much better session handling.

--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
.



Relevant Pages

  • Maintaining sessions with URL
    ... the web page returns list of books (if the ISBN number is partly ... Create URL String with Post data ... I was able to accomplish. ... URLConnection urlconn = url.openConnection; ...
    (comp.lang.java.programmer)
  • Maintaining sessions with URL
    ... the web page returns list of books (if the ISBN number is partly ... Create URL String with Post data ... I was able to accomplish. ... URLConnection urlconn = url.openConnection; ...
    (comp.lang.java.programmer)
  • Re: Maintaining sessions with URL
    ... the web page returns list of books (if the ISBN number is partly ... create another URL string and open the url connection ... I was able to accomplish. ... URLConnection urlconn = url.openConnection; ...
    (comp.lang.java.programmer)
  • Re: Uh oh... theres gonna be trouble in Black Warrior River City with this one (Attn: DEEMSCHAT!)
    ... If selling text books made better athletes they would work out in a ... Tell me how many wins were earned on the field because athletes sold ... If UTinny needs 2 more wins than Bama to feel good about themselves, ... it to fabricate totally imaginary stats to try to accomplish what they ...
    (rec.sport.football.college)
  • Re: Maintaining sessions with URL
    ... the web page returns list of books (if the ISBN number is partly ... Create URL String with Post data ... open the URLConnection ... Any insight on how to repost the second url using the same ...
    (comp.lang.java.programmer)