Hello,
I have set form-based authentication on Websphere 5.1 and it works ok from the browser. Now I need to connect to the Web Container using a
Java client to download protected resources.
The problem is that I cannot see the WASReqURL cookie. I could see the cookie in the browser after I have asked for a protected resource, but not with the Java client:
URLConnection conn = url.openConnection();
Iterator iterator = conn.getHeaderFields().entrySet().iterator();
while (iterator.hasNext()) {
System.out.println(iterator.next());
}
Any ideas?
PS:
Here is what the server returns:
Content-Length=[1526]
null=[HTTP/1.1 200 OK]
Content-Language=[en-US]
Date=[Thu, 24 Nov 2005 12:59:12 GMT]
Server=[WebSphere Application Server/5.1]
Content-Type=[text/html]
last-modified=[Tue, 25 Oct 2005 12:56:25 GMT]