Hi all.
I'm a JSP newbie and I'm trying to write a small client application that should facilitate the user authentication onto wifi hotspots provided by a telco operator from my country.
Basically the application stores the user credentials and when the user push the (only) button on the GUI the application makes the login process by itself without asking the user to open a web browser, be redirected on the captive portal and insert the credentials to enable the internet navigation.
I have no idea of the server-side architecture, I just know that the captive portal presents a sitemap.jsp page (reached over a https connection) which contains a form that sends a POST to the same page with one hidden paramenter (cmd=authenticate) and username and password. The page also sets a cookie containing the JSESSIONID to keep track of the session.
The issue is that I can't figure out what I need to do to post the authentication parameters within the established session.
Where do I need to use the JSESSIONID value when I post the authentication params to the jsp page? Is it somewhere in the HTTP headers? Do I need to manage the cookie somehow? I tried so many ways, but the server still keep generating new sessions showing the login page every time I try to authenticate from my application.
NOTE: I'm trying to address this issue from both Javascript using XHR(from a Win7 gadget/Mac OSx widget) and Java or native code using apache http packages or curl libs.
Thanks in advance for your help.