Re: read multiple webpages of same site using java.net

41 views
Skip to first unread message

Lars Vogel

unread,
Jun 5, 2013, 5:27:00 AM6/5/13
to vog...@googlegroups.com
I don't think that is possible by default in Java.


2013/5/28 Satya Karri <sathy...@gmail.com>
Is there a way to read multiple webpages of a same website.  I am using java.net classes.  I can successfully authenticate to a website and read the data from first web page.  However, when I try to read the second web page of the same site the website is trying to authenticate again.  How can I read the other web pages of the same site without re-authenticating again?

--
You received this message because you are subscribed to the Google Groups "vogella" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vogella+u...@googlegroups.com.
To post to this group, send email to vog...@googlegroups.com.
Visit this group at http://groups.google.com/group/vogella?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Visruth CV

unread,
Jun 5, 2013, 12:37:05 PM6/5/13
to vog...@googlegroups.com
This is possible if the requests are made in the same session. In your case, whenever a request is made it is creating a new session. So, if you keep the same session for each request it is possible. Here is a sample program  (by pass the proxy settings by commenting setProxyServer(proxyAddress, proxyPort, userName, password); in the example). The sample program keeps the same session whenever a new request is made.

Visruth

unread,
Jun 5, 2013, 12:20:41 PM6/5/13
to vog...@googlegroups.com
This is possible if the requests are made in the same session. In your case, whenever a request is made it is creating a new session. So, if you keep the same session for each request it is possible. Here is a sample program  (by pass the proxy settings by commenting setProxyServer(proxyAddress, proxyPort, userName, password); in the example). The sample program keeps the same session whenever a new request is made.
On Wed, May 29, 2013 at 1:14 AM, Satya Karri <sathy...@gmail.com> wrote:
Is there a way to read multiple webpages of a same website.  I am using java.net classes.  I can successfully authenticate to a website and read the data from first web page.  However, when I try to read the second web page of the same site the website is trying to authenticate again.  How can I read the other web pages of the same site without re-authenticating again?
--
You received this message because you are subscribed to the Google Groups "vogella" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vogella+u...@googlegroups.com.
To post to this group, send email to vog...@googlegroups.com.
Visit this group at http://groups.google.com/group/vogella?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.





--
 
Thanks & Regards,
Visruth C.V
Reply all
Reply to author
Forward
0 new messages