• Post Reply Bookmark Topic Watch Topic
  • New Topic

Data Posting Servlet

 
Parvez K
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed a servlet which posts data (using URL, URLConnection, getOutputStream()) to another web sites registration page and also other details. I also catch the response from that server (using BufferedInputStream, getInputStream()) as soon as my data has been posted. Unfortunately the other server response contains only its HTML content and not all the header fields required to further interact with it(like cookies, sessions etc.).
Problem is that I need to carry on with my data input work
even after registering. But some sites like monster.com set up a cookie immediately after successfully registering or maybe store some data in session variables to carry on with your session. I want to post data which actually has to be done after registration.
For that I need to again connect to the server with the header details which i received from that server after registration.
Please help if you have a solution along with the code
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get header fields ... this includes session data try using the getHeaderField methods available in URLConnection class.

------------------
JScape - Java Network Components www.jscape.com
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!