You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by HughT <na...@gmail.com> on 2010/03/07 08:44:36 UTC

Error using import org.apache.commons.httpclient.*

Hello,

I'm new to Apache and I'm trying to use HttpClient in Java, but just can't
seem to be able to get the right jar file for some reason. I keep getting an
error that the package org.apache.commons.httpclient does not exist. I
downloaded almost every related jar file I could find, but it is still not
working. These are the jar files I have so far:

commons-email-1.2
httpclient-4.0.1
httpmime-4.0.1
activation
dsn
imap
mailapi
pop3
smtp
mail
commons-email-javadoc/sources
commons-logging-...
commons-collections-...
commons-net-2.0-...
jakarta-oro-2.0

I'm sure many of these are absolutely useless, but I was growing desperate.
I just need to import org.apache.commons.httpclient.* into Java. If someone
could please let me know what exactly it is I need to download, jar file or
other, I would be extremely grateful!

Hugh
-- 
View this message in context: http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27809614.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


RE: Error using import org.apache.commons.httpclient.*

Posted by Doug Berkland <db...@micros-retail.com>.
> What's the new namespace??
org.apache.http.client


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by HughT <na...@gmail.com>.

What's the new namespace??


olegk wrote:
> 
> On Sun, 2010-03-07 at 10:53 +0000, sebb wrote:
>> On 07/03/2010, HughT <na...@gmail.com> wrote:
>> >
>> >  Hello,
>> >
>> >  I'm new to Apache and I'm trying to use HttpClient in Java, but just
>> can't
>> >  seem to be able to get the right jar file for some reason. I keep
>> getting an
>> >  error that the package org.apache.commons.httpclient does not exist.
> 
> No wonder you are getting this error because
> 'org.apache.commons.httpclient' is the namespace of the old HttpClient
> version (3.1)
> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811842.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2010-03-07 at 10:53 +0000, sebb wrote:
> On 07/03/2010, HughT <na...@gmail.com> wrote:
> >
> >  Hello,
> >
> >  I'm new to Apache and I'm trying to use HttpClient in Java, but just can't
> >  seem to be able to get the right jar file for some reason. I keep getting an
> >  error that the package org.apache.commons.httpclient does not exist.

No wonder you are getting this error because
'org.apache.commons.httpclient' is the namespace of the old HttpClient
version (3.1)

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by sebb <se...@gmail.com>.
On 07/03/2010, HughT <na...@gmail.com> wrote:
>
>
>  I'm trying to automate sending an SMS message from one phone to another. I
>  want to be able to login to a website that sends free SMS messages and then
>  send a message from there, all within Java. Is this a reasonable aim or is
>  it not feasible/overly complicated with HTTPClient?

That entirely depends on what the website requires, and whether they
change the mechanism regularly or not. If they use a lot of Javascript
and dynamic variables it could quickly become very tedious.

And if they start requiring a CAPTCHA it will probably become
impossible without human intervention (the resources available on a
phone are unlikely to be sufficient to decode these for a few years
yet!).

It also depends on how experienced you are with HTTP and Java.

>
>
>  sebb-2-2 wrote:
>  >
>  > On 07/03/2010, HughT <na...@gmail.com> wrote:
>  >>
>  >>  Hmmm... Well, the error disappeared for the time being, which is why I
>  >>  assumed that it worked. So I take it I should remove HTTPClient
>  >> 4.1-alpha1,
>  >>  most probably... Thanks once more.
>  >
>  > I meant that you don't need all the jars.
>  >
>  >>  Seems working with Apache is going to more complicated than I thought.
>  >
>  > Working with any library that is not in the standard Java release is
>  > going to require similar research to find out what dependencies are
>  > needed.
>  >
>  >>  All I
>  >>  want is to be able to login to a website using a username and password
>  >> and
>  >>  then do whatever I want in the site (click buttons, write messages,
>  >> etc.),
>  >>  all through Java code.
>  >
>  > That's potentially a lot of work.
>  > But it would be a lot of work with the standard Java classes as well.
>  >
>  >>  I searched a lot and found that HTTPClient is the best for this kind of
>  >>  stuff. Am I mistaken in this respect?
>  >
>  > No.
>  >
>  >> Is there a better way?
>  >
>  > That depends on what you are ultimately trying to achieve.
>  >
>  > For example:
>  >
>  > Are you trying to learn HTTP programming?
>  > Are you trying to test a website?
>  > Automate some process?
>  >
>  >>
>  >>
>  >>
>  >>
>  >>  sebb-2-2 wrote:
>  >>  >
>  >>  > Something is probably still wrong, as you now have both HttpClient 3.1
>  >>  > and HttpClient 4.1-alpha1.
>  >>  >
>  >>  > You should not need both unless you are writing quite an unusual
>  >>  > application.
>  >>  >
>  >>  > Note the HC 4.1 is not compatible with HC 3.1.
>  >>  >
>  >>  > Code for 3.1 needs to be rewritten to use 4.1 - they have different
>  >>  > package names and different architecture.
>  >>  >
>  >>  > On 07/03/2010, HughT <na...@gmail.com> wrote:
>  >>  >>
>  >>  >>
>  >>  >>  Thanks for all your help! It works now, I looked up the page you
>  >>  >> suggested
>  >>  >>  and turns out I still needed commons-codec, httpcore,
>  >>  >>  commons-httpclient-3.1, and http-client-4.1-alpha1. Thanks again.
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>  sebb-2-2 wrote:
>  >>  >>  >
>  >>  >>  > On 07/03/2010, HughT <na...@gmail.com> wrote:
>  >>  >>  >>
>  >>  >>  >>  Hello,
>  >>  >>  >>
>  >>  >>  >>  I'm new to Apache and I'm trying to use HttpClient in Java, but
>  >> just
>  >>  >>  >> can't
>  >>  >>  >>  seem to be able to get the right jar file for some reason. I
>  >> keep
>  >>  >>  >> getting an
>  >>  >>  >>  error that the package org.apache.commons.httpclient does not
>  >> exist.
>  >>  >> I
>  >>  >>  >>  downloaded almost every related jar file I could find, but it is
>  >>  >> still
>  >>  >>  >> not
>  >>  >>  >>  working. These are the jar files I have so far:
>  >>  >>  >>
>  >>  >>  >>  commons-email-1.2
>  >>  >>  >>  httpclient-4.0.1
>  >>  >>  >>  httpmime-4.0.1
>  >>  >>  >
>  >>  >>  > You also need
>  >>  >>  >
>  >>  >>  > commons-codec
>  >>  >>  > httpcore
>  >>  >>  >
>  >>  >>  > see:
>  >>  >>  >
>  >>  >>  >
>  >>  >>
>  >> http://hc.apache.org/httpcomponents-client/httpclient/dependencies.html
>  >>  >>  >
>  >>  >>  >>  activation
>  >>  >>  >>  dsn
>  >>  >>  >>  imap
>  >>  >>  >>  mailapi
>  >>  >>  >>  pop3
>  >>  >>  >>  smtp
>  >>  >>  >>  mail
>  >>  >>  >>  commons-email-javadoc/sources
>  >>  >>  >>  commons-logging-...
>  >>  >>  >>  commons-collections-...
>  >>  >>  >>  commons-net-2.0-...
>  >>  >>  >>  jakarta-oro-2.0
>  >>  >>  >>
>  >>  >>  >>  I'm sure many of these are absolutely useless, but I was growing
>  >>  >>  >> desperate.
>  >>  >>  >>  I just need to import org.apache.commons.httpclient.* into Java.
>  >> If
>  >>  >>  >> someone
>  >>  >>  >>  could please let me know what exactly it is I need to download,
>  >> jar
>  >>  >> file
>  >>  >>  >> or
>  >>  >>  >>  other, I would be extremely grateful!
>  >>  >>  >
>  >>  >>  > Check the dependency details on the websites.
>  >>  >>  >
>  >>  >>  >>  Hugh
>  >>  >>  >>
>  >>  >>  >> --
>  >>  >>  >>  View this message in context:
>  >>  >>  >>
>  >>  >>
>  >> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27809614.html
>  >>  >>  >>  Sent from the HttpClient-User mailing list archive at
>  >> Nabble.com.
>  >>  >>  >>
>  >>  >>  >>
>  >>  >>  >>
>  >>  >> ---------------------------------------------------------------------
>  >>  >>  >>  To unsubscribe, e-mail:
>  >> httpclient-users-unsubscribe@hc.apache.org
>  >>  >>  >>  For additional commands, e-mail:
>  >> httpclient-users-help@hc.apache.org
>  >>  >>  >>
>  >>  >>  >>
>  >>  >>  >
>  >>  >>  >
>  >> ---------------------------------------------------------------------
>  >>  >>  > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  >>  >>  > For additional commands, e-mail:
>  >> httpclient-users-help@hc.apache.org
>  >>  >>  >
>  >>  >>  >
>  >>  >>  >
>  >>  >>
>  >>  >>
>  >>  >> --
>  >>  >>  View this message in context:
>  >>  >>
>  >> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811609.html
>  >>  >>
>  >>  >> Sent from the HttpClient-User mailing list archive at Nabble.com.
>  >>  >>
>  >>  >>
>  >>  >>
>  >> ---------------------------------------------------------------------
>  >>  >>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  >>  >>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >>  >>
>  >>  >>
>  >>  >
>  >>  > ---------------------------------------------------------------------
>  >>  > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  >>  > For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >>  >
>  >>  >
>  >>  >
>  >>
>  >>  --
>  >>
>  >> View this message in context:
>  >> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811792.html
>  >>
>  >> Sent from the HttpClient-User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  >>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  > For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >
>  >
>  >
>
>  --
>
> View this message in context: http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27812374.html
>
> Sent from the HttpClient-User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by HughT <na...@gmail.com>.

I'm trying to automate sending an SMS message from one phone to another. I
want to be able to login to a website that sends free SMS messages and then
send a message from there, all within Java. Is this a reasonable aim or is
it not feasible/overly complicated with HTTPClient?


sebb-2-2 wrote:
> 
> On 07/03/2010, HughT <na...@gmail.com> wrote:
>>
>>  Hmmm... Well, the error disappeared for the time being, which is why I
>>  assumed that it worked. So I take it I should remove HTTPClient
>> 4.1-alpha1,
>>  most probably... Thanks once more.
> 
> I meant that you don't need all the jars.
> 
>>  Seems working with Apache is going to more complicated than I thought.
> 
> Working with any library that is not in the standard Java release is
> going to require similar research to find out what dependencies are
> needed.
> 
>>  All I
>>  want is to be able to login to a website using a username and password
>> and
>>  then do whatever I want in the site (click buttons, write messages,
>> etc.),
>>  all through Java code.
> 
> That's potentially a lot of work.
> But it would be a lot of work with the standard Java classes as well.
> 
>>  I searched a lot and found that HTTPClient is the best for this kind of
>>  stuff. Am I mistaken in this respect?
> 
> No.
> 
>> Is there a better way?
> 
> That depends on what you are ultimately trying to achieve.
> 
> For example:
> 
> Are you trying to learn HTTP programming?
> Are you trying to test a website?
> Automate some process?
> 
>>
>>
>>
>>
>>  sebb-2-2 wrote:
>>  >
>>  > Something is probably still wrong, as you now have both HttpClient 3.1
>>  > and HttpClient 4.1-alpha1.
>>  >
>>  > You should not need both unless you are writing quite an unusual
>>  > application.
>>  >
>>  > Note the HC 4.1 is not compatible with HC 3.1.
>>  >
>>  > Code for 3.1 needs to be rewritten to use 4.1 - they have different
>>  > package names and different architecture.
>>  >
>>  > On 07/03/2010, HughT <na...@gmail.com> wrote:
>>  >>
>>  >>
>>  >>  Thanks for all your help! It works now, I looked up the page you
>>  >> suggested
>>  >>  and turns out I still needed commons-codec, httpcore,
>>  >>  commons-httpclient-3.1, and http-client-4.1-alpha1. Thanks again.
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>  sebb-2-2 wrote:
>>  >>  >
>>  >>  > On 07/03/2010, HughT <na...@gmail.com> wrote:
>>  >>  >>
>>  >>  >>  Hello,
>>  >>  >>
>>  >>  >>  I'm new to Apache and I'm trying to use HttpClient in Java, but
>> just
>>  >>  >> can't
>>  >>  >>  seem to be able to get the right jar file for some reason. I
>> keep
>>  >>  >> getting an
>>  >>  >>  error that the package org.apache.commons.httpclient does not
>> exist.
>>  >> I
>>  >>  >>  downloaded almost every related jar file I could find, but it is
>>  >> still
>>  >>  >> not
>>  >>  >>  working. These are the jar files I have so far:
>>  >>  >>
>>  >>  >>  commons-email-1.2
>>  >>  >>  httpclient-4.0.1
>>  >>  >>  httpmime-4.0.1
>>  >>  >
>>  >>  > You also need
>>  >>  >
>>  >>  > commons-codec
>>  >>  > httpcore
>>  >>  >
>>  >>  > see:
>>  >>  >
>>  >>  >
>>  >>
>> http://hc.apache.org/httpcomponents-client/httpclient/dependencies.html
>>  >>  >
>>  >>  >>  activation
>>  >>  >>  dsn
>>  >>  >>  imap
>>  >>  >>  mailapi
>>  >>  >>  pop3
>>  >>  >>  smtp
>>  >>  >>  mail
>>  >>  >>  commons-email-javadoc/sources
>>  >>  >>  commons-logging-...
>>  >>  >>  commons-collections-...
>>  >>  >>  commons-net-2.0-...
>>  >>  >>  jakarta-oro-2.0
>>  >>  >>
>>  >>  >>  I'm sure many of these are absolutely useless, but I was growing
>>  >>  >> desperate.
>>  >>  >>  I just need to import org.apache.commons.httpclient.* into Java.
>> If
>>  >>  >> someone
>>  >>  >>  could please let me know what exactly it is I need to download,
>> jar
>>  >> file
>>  >>  >> or
>>  >>  >>  other, I would be extremely grateful!
>>  >>  >
>>  >>  > Check the dependency details on the websites.
>>  >>  >
>>  >>  >>  Hugh
>>  >>  >>
>>  >>  >> --
>>  >>  >>  View this message in context:
>>  >>  >>
>>  >>
>> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27809614.html
>>  >>  >>  Sent from the HttpClient-User mailing list archive at
>> Nabble.com.
>>  >>  >>
>>  >>  >>
>>  >>  >>
>>  >> ---------------------------------------------------------------------
>>  >>  >>  To unsubscribe, e-mail:
>> httpclient-users-unsubscribe@hc.apache.org
>>  >>  >>  For additional commands, e-mail:
>> httpclient-users-help@hc.apache.org
>>  >>  >>
>>  >>  >>
>>  >>  >
>>  >>  >
>> ---------------------------------------------------------------------
>>  >>  > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>>  >>  > For additional commands, e-mail:
>> httpclient-users-help@hc.apache.org
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>
>>  >>
>>  >> --
>>  >>  View this message in context:
>>  >>
>> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811609.html
>>  >>
>>  >> Sent from the HttpClient-User mailing list archive at Nabble.com.
>>  >>
>>  >>
>>  >> 
>> ---------------------------------------------------------------------
>>  >>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>>  >>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>  >>
>>  >>
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>>  > For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>  >
>>  >
>>  >
>>
>>  --
>>
>> View this message in context:
>> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811792.html
>>
>> Sent from the HttpClient-User mailing list archive at Nabble.com.
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27812374.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by sebb <se...@gmail.com>.
On 07/03/2010, HughT <na...@gmail.com> wrote:
>
>  Hmmm... Well, the error disappeared for the time being, which is why I
>  assumed that it worked. So I take it I should remove HTTPClient 4.1-alpha1,
>  most probably... Thanks once more.

I meant that you don't need all the jars.

>  Seems working with Apache is going to more complicated than I thought.

Working with any library that is not in the standard Java release is
going to require similar research to find out what dependencies are
needed.

>  All I
>  want is to be able to login to a website using a username and password and
>  then do whatever I want in the site (click buttons, write messages, etc.),
>  all through Java code.

That's potentially a lot of work.
But it would be a lot of work with the standard Java classes as well.

>  I searched a lot and found that HTTPClient is the best for this kind of
>  stuff. Am I mistaken in this respect?

No.

> Is there a better way?

That depends on what you are ultimately trying to achieve.

For example:

Are you trying to learn HTTP programming?
Are you trying to test a website?
Automate some process?

>
>
>
>
>  sebb-2-2 wrote:
>  >
>  > Something is probably still wrong, as you now have both HttpClient 3.1
>  > and HttpClient 4.1-alpha1.
>  >
>  > You should not need both unless you are writing quite an unusual
>  > application.
>  >
>  > Note the HC 4.1 is not compatible with HC 3.1.
>  >
>  > Code for 3.1 needs to be rewritten to use 4.1 - they have different
>  > package names and different architecture.
>  >
>  > On 07/03/2010, HughT <na...@gmail.com> wrote:
>  >>
>  >>
>  >>  Thanks for all your help! It works now, I looked up the page you
>  >> suggested
>  >>  and turns out I still needed commons-codec, httpcore,
>  >>  commons-httpclient-3.1, and http-client-4.1-alpha1. Thanks again.
>  >>
>  >>
>  >>
>  >>
>  >>  sebb-2-2 wrote:
>  >>  >
>  >>  > On 07/03/2010, HughT <na...@gmail.com> wrote:
>  >>  >>
>  >>  >>  Hello,
>  >>  >>
>  >>  >>  I'm new to Apache and I'm trying to use HttpClient in Java, but just
>  >>  >> can't
>  >>  >>  seem to be able to get the right jar file for some reason. I keep
>  >>  >> getting an
>  >>  >>  error that the package org.apache.commons.httpclient does not exist.
>  >> I
>  >>  >>  downloaded almost every related jar file I could find, but it is
>  >> still
>  >>  >> not
>  >>  >>  working. These are the jar files I have so far:
>  >>  >>
>  >>  >>  commons-email-1.2
>  >>  >>  httpclient-4.0.1
>  >>  >>  httpmime-4.0.1
>  >>  >
>  >>  > You also need
>  >>  >
>  >>  > commons-codec
>  >>  > httpcore
>  >>  >
>  >>  > see:
>  >>  >
>  >>  >
>  >> http://hc.apache.org/httpcomponents-client/httpclient/dependencies.html
>  >>  >
>  >>  >>  activation
>  >>  >>  dsn
>  >>  >>  imap
>  >>  >>  mailapi
>  >>  >>  pop3
>  >>  >>  smtp
>  >>  >>  mail
>  >>  >>  commons-email-javadoc/sources
>  >>  >>  commons-logging-...
>  >>  >>  commons-collections-...
>  >>  >>  commons-net-2.0-...
>  >>  >>  jakarta-oro-2.0
>  >>  >>
>  >>  >>  I'm sure many of these are absolutely useless, but I was growing
>  >>  >> desperate.
>  >>  >>  I just need to import org.apache.commons.httpclient.* into Java. If
>  >>  >> someone
>  >>  >>  could please let me know what exactly it is I need to download, jar
>  >> file
>  >>  >> or
>  >>  >>  other, I would be extremely grateful!
>  >>  >
>  >>  > Check the dependency details on the websites.
>  >>  >
>  >>  >>  Hugh
>  >>  >>
>  >>  >> --
>  >>  >>  View this message in context:
>  >>  >>
>  >> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27809614.html
>  >>  >>  Sent from the HttpClient-User mailing list archive at Nabble.com.
>  >>  >>
>  >>  >>
>  >>  >>
>  >> ---------------------------------------------------------------------
>  >>  >>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  >>  >>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >>  >>
>  >>  >>
>  >>  >
>  >>  > ---------------------------------------------------------------------
>  >>  > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  >>  > For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >>  >
>  >>  >
>  >>  >
>  >>
>  >>
>  >> --
>  >>  View this message in context:
>  >> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811609.html
>  >>
>  >> Sent from the HttpClient-User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  >>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  > For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >
>  >
>  >
>
>  --
>
> View this message in context: http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811792.html
>
> Sent from the HttpClient-User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by HughT <na...@gmail.com>.
Hmmm... Well, the error disappeared for the time being, which is why I
assumed that it worked. So I take it I should remove HTTPClient 4.1-alpha1,
most probably... Thanks once more. 
Seems working with Apache is going to more complicated than I thought. All I
want is to be able to login to a website using a username and password and
then do whatever I want in the site (click buttons, write messages, etc.),
all through Java code.
I searched a lot and found that HTTPClient is the best for this kind of
stuff. Am I mistaken in this respect? Is there a better way?




sebb-2-2 wrote:
> 
> Something is probably still wrong, as you now have both HttpClient 3.1
> and HttpClient 4.1-alpha1.
> 
> You should not need both unless you are writing quite an unusual
> application.
> 
> Note the HC 4.1 is not compatible with HC 3.1.
> 
> Code for 3.1 needs to be rewritten to use 4.1 - they have different
> package names and different architecture.
> 
> On 07/03/2010, HughT <na...@gmail.com> wrote:
>>
>>
>>  Thanks for all your help! It works now, I looked up the page you
>> suggested
>>  and turns out I still needed commons-codec, httpcore,
>>  commons-httpclient-3.1, and http-client-4.1-alpha1. Thanks again.
>>
>>
>>
>>
>>  sebb-2-2 wrote:
>>  >
>>  > On 07/03/2010, HughT <na...@gmail.com> wrote:
>>  >>
>>  >>  Hello,
>>  >>
>>  >>  I'm new to Apache and I'm trying to use HttpClient in Java, but just
>>  >> can't
>>  >>  seem to be able to get the right jar file for some reason. I keep
>>  >> getting an
>>  >>  error that the package org.apache.commons.httpclient does not exist.
>> I
>>  >>  downloaded almost every related jar file I could find, but it is
>> still
>>  >> not
>>  >>  working. These are the jar files I have so far:
>>  >>
>>  >>  commons-email-1.2
>>  >>  httpclient-4.0.1
>>  >>  httpmime-4.0.1
>>  >
>>  > You also need
>>  >
>>  > commons-codec
>>  > httpcore
>>  >
>>  > see:
>>  >
>>  >
>> http://hc.apache.org/httpcomponents-client/httpclient/dependencies.html
>>  >
>>  >>  activation
>>  >>  dsn
>>  >>  imap
>>  >>  mailapi
>>  >>  pop3
>>  >>  smtp
>>  >>  mail
>>  >>  commons-email-javadoc/sources
>>  >>  commons-logging-...
>>  >>  commons-collections-...
>>  >>  commons-net-2.0-...
>>  >>  jakarta-oro-2.0
>>  >>
>>  >>  I'm sure many of these are absolutely useless, but I was growing
>>  >> desperate.
>>  >>  I just need to import org.apache.commons.httpclient.* into Java. If
>>  >> someone
>>  >>  could please let me know what exactly it is I need to download, jar
>> file
>>  >> or
>>  >>  other, I would be extremely grateful!
>>  >
>>  > Check the dependency details on the websites.
>>  >
>>  >>  Hugh
>>  >>
>>  >> --
>>  >>  View this message in context:
>>  >>
>> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27809614.html
>>  >>  Sent from the HttpClient-User mailing list archive at Nabble.com.
>>  >>
>>  >>
>>  >> 
>> ---------------------------------------------------------------------
>>  >>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>>  >>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>  >>
>>  >>
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>>  > For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>  >
>>  >
>>  >
>>
>>
>> --
>>  View this message in context:
>> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811609.html
>>
>> Sent from the HttpClient-User mailing list archive at Nabble.com.
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811792.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by sebb <se...@gmail.com>.
Something is probably still wrong, as you now have both HttpClient 3.1
and HttpClient 4.1-alpha1.

You should not need both unless you are writing quite an unusual application.

Note the HC 4.1 is not compatible with HC 3.1.

Code for 3.1 needs to be rewritten to use 4.1 - they have different
package names and different architecture.

On 07/03/2010, HughT <na...@gmail.com> wrote:
>
>
>  Thanks for all your help! It works now, I looked up the page you suggested
>  and turns out I still needed commons-codec, httpcore,
>  commons-httpclient-3.1, and http-client-4.1-alpha1. Thanks again.
>
>
>
>
>  sebb-2-2 wrote:
>  >
>  > On 07/03/2010, HughT <na...@gmail.com> wrote:
>  >>
>  >>  Hello,
>  >>
>  >>  I'm new to Apache and I'm trying to use HttpClient in Java, but just
>  >> can't
>  >>  seem to be able to get the right jar file for some reason. I keep
>  >> getting an
>  >>  error that the package org.apache.commons.httpclient does not exist. I
>  >>  downloaded almost every related jar file I could find, but it is still
>  >> not
>  >>  working. These are the jar files I have so far:
>  >>
>  >>  commons-email-1.2
>  >>  httpclient-4.0.1
>  >>  httpmime-4.0.1
>  >
>  > You also need
>  >
>  > commons-codec
>  > httpcore
>  >
>  > see:
>  >
>  > http://hc.apache.org/httpcomponents-client/httpclient/dependencies.html
>  >
>  >>  activation
>  >>  dsn
>  >>  imap
>  >>  mailapi
>  >>  pop3
>  >>  smtp
>  >>  mail
>  >>  commons-email-javadoc/sources
>  >>  commons-logging-...
>  >>  commons-collections-...
>  >>  commons-net-2.0-...
>  >>  jakarta-oro-2.0
>  >>
>  >>  I'm sure many of these are absolutely useless, but I was growing
>  >> desperate.
>  >>  I just need to import org.apache.commons.httpclient.* into Java. If
>  >> someone
>  >>  could please let me know what exactly it is I need to download, jar file
>  >> or
>  >>  other, I would be extremely grateful!
>  >
>  > Check the dependency details on the websites.
>  >
>  >>  Hugh
>  >>
>  >> --
>  >>  View this message in context:
>  >> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27809614.html
>  >>  Sent from the HttpClient-User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  >>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  > For additional commands, e-mail: httpclient-users-help@hc.apache.org
>  >
>  >
>  >
>
>
> --
>  View this message in context: http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811609.html
>
> Sent from the HttpClient-User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by HughT <na...@gmail.com>.

Thanks for all your help! It works now, I looked up the page you suggested
and turns out I still needed commons-codec, httpcore,
commons-httpclient-3.1, and http-client-4.1-alpha1. Thanks again.



sebb-2-2 wrote:
> 
> On 07/03/2010, HughT <na...@gmail.com> wrote:
>>
>>  Hello,
>>
>>  I'm new to Apache and I'm trying to use HttpClient in Java, but just
>> can't
>>  seem to be able to get the right jar file for some reason. I keep
>> getting an
>>  error that the package org.apache.commons.httpclient does not exist. I
>>  downloaded almost every related jar file I could find, but it is still
>> not
>>  working. These are the jar files I have so far:
>>
>>  commons-email-1.2
>>  httpclient-4.0.1
>>  httpmime-4.0.1
> 
> You also need
> 
> commons-codec
> httpcore
> 
> see:
> 
> http://hc.apache.org/httpcomponents-client/httpclient/dependencies.html
> 
>>  activation
>>  dsn
>>  imap
>>  mailapi
>>  pop3
>>  smtp
>>  mail
>>  commons-email-javadoc/sources
>>  commons-logging-...
>>  commons-collections-...
>>  commons-net-2.0-...
>>  jakarta-oro-2.0
>>
>>  I'm sure many of these are absolutely useless, but I was growing
>> desperate.
>>  I just need to import org.apache.commons.httpclient.* into Java. If
>> someone
>>  could please let me know what exactly it is I need to download, jar file
>> or
>>  other, I would be extremely grateful!
> 
> Check the dependency details on the websites.
> 
>>  Hugh
>>
>> --
>>  View this message in context:
>> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27809614.html
>>  Sent from the HttpClient-User mailing list archive at Nabble.com.
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27811609.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by sebb <se...@gmail.com>.
On 07/03/2010, HughT <na...@gmail.com> wrote:
>
>  Hello,
>
>  I'm new to Apache and I'm trying to use HttpClient in Java, but just can't
>  seem to be able to get the right jar file for some reason. I keep getting an
>  error that the package org.apache.commons.httpclient does not exist. I
>  downloaded almost every related jar file I could find, but it is still not
>  working. These are the jar files I have so far:
>
>  commons-email-1.2
>  httpclient-4.0.1
>  httpmime-4.0.1

You also need

commons-codec
httpcore

see:

http://hc.apache.org/httpcomponents-client/httpclient/dependencies.html

>  activation
>  dsn
>  imap
>  mailapi
>  pop3
>  smtp
>  mail
>  commons-email-javadoc/sources
>  commons-logging-...
>  commons-collections-...
>  commons-net-2.0-...
>  jakarta-oro-2.0
>
>  I'm sure many of these are absolutely useless, but I was growing desperate.
>  I just need to import org.apache.commons.httpclient.* into Java. If someone
>  could please let me know what exactly it is I need to download, jar file or
>  other, I would be extremely grateful!

Check the dependency details on the websites.

>  Hugh
>
> --
>  View this message in context: http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27809614.html
>  Sent from the HttpClient-User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>  For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Error using import org.apache.commons.httpclient.*

Posted by Jean-François Lacoume <je...@wanadoo.fr>.
Hello Hugh,

I had the same question just few days ago. I'm new too...
It seems you have to set your CLASSPATH variable. Depending on your OS, you 
can find the way to do to it on the Web 
(http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html).

My OS is windows XP. What I did is :
    - uncompress the zip files,
    - use maven to build,
    - set the CLASSPATH as it is explained here : 
http://faculty.ed.umuc.edu/~arnoldyl/NetBeansTutorials/Setting-Classpath.html

Hope it will help,
Best regards,

Jeff
----- Original Message ----- 
From: "HughT" <na...@gmail.com>
To: <ht...@hc.apache.org>
Sent: Sunday, March 07, 2010 8:44 AM
Subject: Error using import org.apache.commons.httpclient.*


>
>
> Hello,
>
> I'm new to Apache and I'm trying to use HttpClient in Java, but just can't
> seem to be able to get the right jar file for some reason. I keep getting 
> an
> error that the package org.apache.commons.httpclient does not exist. I
> downloaded almost every related jar file I could find, but it is still not
> working. These are the jar files I have so far:
>
> commons-email-1.2
> httpclient-4.0.1
> httpmime-4.0.1
> activation
> dsn
> imap
> mailapi
> pop3
> smtp
> mail
> commons-email-javadoc/sources
> commons-logging-...
> commons-collections-...
> commons-net-2.0-...
> jakarta-oro-2.0
>
> I'm sure many of these are absolutely useless, but I was growing 
> desperate.
> I just need to import org.apache.commons.httpclient.* into Java. If 
> someone
> could please let me know what exactly it is I need to download, jar file 
> or
> other, I would be extremely grateful!
>
> Hugh
> -- 
> View this message in context: 
> http://old.nabble.com/Error-using-import-org.apache.commons.httpclient.*-tp27809614p27809614.html
> Sent from the HttpClient-User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.435 / Virus Database: 271.1.1/2727 - Release Date: 03/06/10 
19:34:00




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org