Hi Roland,
Thank you for the fast response.
The exception is from server, because I see on the response header that,
the server set a new jsession cookie on it.
An another question, if I have a cookie parameter from browser via
javascript or what ever....
HttpClient httpclient = new HttpClient();
httpclient.getState().addCookie(
new Cookie("www.whatever.com", "jsession", "topsecret",
"/", -1, false));
GetMethod httpget = new GetMethod("http://www.whatever.com");
Does this work for me? I found this in an old thread, or is there any
other way to set Cookie?
Thanks,
Alvin
[EMAIL PROTECTED] ConSol* Software GmbH
Phone +49-89-45841-191 Consulting & Solutions
Fax +49-89-45841-111 Franziskanerstr. 38
Mobile+49-160-97340713
http://www.consol.de 81669 München
-----Ursprüngliche Nachricht-----
Von: Roland Weber [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 19. Oktober 2005 07:53
An: HttpClient User Discussion
Betreff: Re: Java plugin 1.4.2 Cookie support URLConnection vs
HttpClient
Hi Alvin,
> As I understood Java plugin supports Cookie support for URLConnection
as
> shown here.
>
http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/cookie_
> support.html
>
> As there any way in htttpclient to use this option?
To make it short: No. HttpClient does in no way interact with the
Java Plug-in. You have to establish a new session with the server.
Maybe you can use some JavaScript to pass the required parameters
to the applet, for example the session cookie.
You did not mention where the UnauthorizedException occurs. If it
is on the server, the missing session cookie might be the reason.
If it happens on the client, the reason is the security model in
the browser environment. You have to sign the applet and the JARs
that hold HttpClient to permit some of the things HttpClient does
when initializing or opening a connection.
hope that helps,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]