Hello Michael,
Thank you for the reply.
What exactly is the problem you are having? Is HttpClient throwing
exceptions when it tries to parse the cookies from this server?
I am sorry for not writing clearly before.
I am trying to access a site which gives me a fixed response Server is
busy please try later. This seems to be a canned response which I get
from my browser only when I disable cookies. Otherwise I have never
received this response on a browser.
Please feel free to correct me if I am wrong
1. Either the server has some check and sends a canned response for
anybody trying to access using a program, I think this should not be the
case because only way they can find the client is by User-agent which
can be set or
2. My browser gives same response code when cookies are disabled so I
want to make sure it is not a cookie problem.
I am trying to perform a Japanese trademark search on this site
http://www2.ipdl.jpo.go.jp/beginner_tm/TM_AREA.cgi (NOTE: if you want to
try it, text box expects only double byte input)
PFA the log. I highly appreciate your help.
Regards,
Amit.
-Original Message-
From: Michael Becke [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 11:46 AM
To: Commons HttpClient Project
Subject: Re: automatic management of cookie
Hello Amit,
HttpClient client = new HttpClient();
client.getState().setCookiePolicy(CookiePolicy.COMPATIBILITY);
HttpMethod method = new GetMethod(url);
Int statusCode = client.executeMethod(method);
This will configure HttpClient to use the compatibility cookie mode.
This is not necessarily required but is probably best to ensure
correct
cookie handling.
Please feel free to point me to a document/link which can give more
information about the same.
I am trying to connect to a website which needs cookie support
from the client. I am getting same response while trying to connect
from
httpclient which I get when I access the site with cookies disabled
in
my browser.
The cookie documentation on the HttpClient site is about all there is.
There's not too much more to it.
What exactly is the problem you are having? Is HttpClient throwing
exceptions when it tries to parse the cookies from this server?
Please take a look at the trouble shooting guide
http://jakarta.apache.org/commons/httpclient/troubleshooting.html
for
some more things to look at. If this is not helpful in resolving the
problem please post a wire log to the mailing list that shows the
problematic transmission, see
http://jakarta.apache.org/commons/httpclient/logging.html for how to
create a wire log.
Mike
-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
2003/06/25 11:59:55:714 JST [DEBUG] HttpClient - -Java version: 1.4.1_01
2003/06/25 11:59:55:714 JST [DEBUG] HttpClient - -Java vendor: Sun Microsystems Inc.
2003/06/25 11:59:55:714 JST [DEBUG] HttpClient - -Java class path:
E:\Solis-work\solismark\WEB-INF\classes;E:\Solis-work\solismark\WEB-INF\lib\commons-httpclient-2.0-beta1.jar;E:\Solis-work\solismark\WEB-INF\lib\commons-logging-1.0.2.jar;E:\Solis-work\solismark\WEB-INF\lib\htmlparser.jar
2003/06/25 11:59:55:714 JST [DEBUG] HttpClient - -Operating system name: Windows XP
2003/06/25 11:59:55:714 JST [DEBUG] HttpClient - -Operating system architecture: x86
2003/06/25 11:59:55:714 JST [DEBUG] HttpClient - -Operating system version: 5.1
2003/06/25 11:59:56:175 JST [DEBUG] HttpClient - -SUN 1.2: SUN (DSA key/parameter
generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS
keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores)
2003/06/25 11:59:56:175 JST [DEBUG] HttpClient - -SunJSSE 1.41: Sun JSSE
provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
2003/06/25 11:59:56:175 JST [DEBUG] HttpClient - -SunRsaSign 1.0: SUN's provider for
RSA signatures
2003/06/25 11:59:56:175 JST [DEBUG] HttpClient - -SunJCE 1.4: SunJCE Provider
(implements DES, Triple DES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, HMAC-SHA1)
2003/06/25 11:59:56:175 JST [DEBUG] HttpClient - -SunJGSS 1.0: Sun (Kerberos v5)
2003/06/25 11:59:56:285 JST [TRACE] GetMethod - -enter GetMethod(String)
2003/06/25 11:59:56:305 JST [TRACE] HttpMethod -
-HttpMethodBase.addRequestHeader(Header)
2003/06/25 11:59:56:305 JST [TRACE] HttpMethod -
-HttpMethodBase.addRequestHeader(Header)
2003/06/25 11:59:56:305 JST [TRACE] HttpMethod -
-HttpMethodBase.addRequestHeader(Header)
2003/06/25 11:59:56:305 JST [TRACE] HttpMethod -
-HttpMethodBase.addRequestHeader(Header)
2003/06/25 11:59:56:305 JST [TRACE] HttpMethod -
-HttpMethodBase.addRequestHeader(Header)
2003/06/25 11:59:56:305 JST [TRACE] HttpMethod -
-HttpMethodBase.addRequestHeader(Header)
2003/06/25 11:59:56:305 JST [TRACE] HttpMethod -
-HttpMethodBase.addRequestHeader(Header)
2003/06/25