*
The moose likes Sockets and Internet Protocols and the fly likes Multiple request in single connection using HttpClient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Multiple request in single connection using HttpClient" Watch "Multiple request in single connection using HttpClient" New topic
Author

Multiple request in single connection using HttpClient

Ashish Kirpan
Greenhorn

Joined: Jan 24, 2011
Posts: 22

hi I am using these classes

org.apache.commons.httpclient.HttpClient;
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
org.apache.commons.httpclient.methods.PostMethod;

to send multiple request in single connection.
but i get 403 forbidden error as response
i also use the correct certificate.
is anything is missing. i use jdk1.4.09 for this class.
Please help if anyone know...

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19655
    
  18

Error 403 means "Forbidden". That usually means one of the following:
1) you forgot to login somewhere
2) the resource is only accessible if the referer is the same site (or one of the other allowed hosts)
3) you are not on the allowed hosts list, based on IP
4) you are explicitly blocked, based on IP

My guess is the second reason is applicable here.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ashish Kirpan
Greenhorn

Joined: Jan 24, 2011
Posts: 22

Thanks Rob
but according to my observation there is no IP blocked
Site is HTTPS and accessible to everything
i m also sending certificate to server
but i got 403 consistntaly.
Any suggession???

or any alternative way to send multiple request to server.
Ashish Kirpan
Greenhorn

Joined: Jan 24, 2011
Posts: 22

Hi Rob,
your fourth option is correct, our IP was blocked.
Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Multiple request in single connection using HttpClient
 
Similar Threads
Sharing Connection Object
Proper way to use a connection pool
Logging from the Data singleton
HttpsURLConnection
JMS: queueConnection versus QueueSession