calling jsp using HttpURLConnection and issue with Session

Hi,

I have a situation where i need to call a JSP application from a Java program, pass some parameters, "screen scrape" the information and populate a database.

First i used a standalone HTML to post this information to JSP app and i could see that the information is coming up properly in the browser.

I tried to simulate this by using HTTPURLConnection and post the data.

At JSP application side, it is receiving the values, putting them into a session using Session.putValue and then forwarding to another page. In the next page, it tries to retrieve the value from Session and if value is not present, it gives an error page.

If i connect using HTTPURLConnection it is not able getting the value from Session and it always gives error page.

Is there any remedy for such a situation? I am restricted to HttpURLConnection since i need to do this process automatically from an application that is not UI based.

Any suggestions would be a great help!

Thanks,

Ayyappa

[1034 byte] By [justdev1a] at [2007-10-2 21:05:24]
# 1
http://forum.java.sun.com/thread.jspa?threadID=710218&messageID=4110978
CjavaVMa at 2007-7-13 23:50:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...