Reputation: 303
I am trying to stream content of a URL that is secure. The URL is accessible only after you login with username or password. When you are not logged in, you will be redirected to login.jsp. How can I stream such a URL? Is there a way to maintain session? I want to stream and store that content in file system. I cannot even provide password using Apache httpClient authentication because the passwords are one-way encrypted.
Thanks in advance
Upvotes: 0
Views: 83
Reputation: 303
By setting the Cookie as David Conrad suggested, I got it working using the following code sample. urlConnection.setRequestProperty("Cookie", "JSESSIONID=" + request.getSession().getId() + "; rememberMe=false")
Upvotes: 1