This content has been marked as final. Show 6 replies
What does this question have to do with Java Web Start?
Your post is an incomplete mess. You do a login through a servlet. Okay, but how is the logged in state maintained? If it is by setting some property in the session, the problem is likely there. URLConnection is not a browser, it does not maintain and send a jSESSIONID cookie. you have to do that yourself.
I tried the same, using JSESSIONID as parameter in the urls (the same id in both urls i use), but that doesnt work.
Read my post again. Where do I say anything about a parameter?
Moved from Java WebStart to Java Servlet for closer topic alignment.
Im trying obtaining the JIDSESSION by
and in the response
res.setHeader("SET-COOKIE", "JSESSIONID=" + urlcache + "; HttpOnly");
But this doesnt work.
... so you are doing it wrong and you need to Google around a bit more to figure out how to properly do it :/
Make your life easier: use Apache HttpClient in stead of URLConnection to send requests. If anything, it has proper documentation and example programs: