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 Emiliano Carlesi <em...@itattitude.com> on 2015/05/28 23:43:23 UTC

There are known problems of running HttpClient in a web application?

Hi to all,
I have a problem I can't understand related to the execution of HttpClient 4 within a web application running in Tomcat + Struts2.

I create an HTTP client for a specific site that uses basic authentication over HTTPS. 
While execute my client from a console application,  it works properly. 
When I try to use the client from within the web application I always get an HTTP 301 result code from the web server.

I have no access to the server logs.

I try to enable the trace using these  instruction:

System.setProperty("org.apache.commons.logging.Log","org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.wire", "DEBUG");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.impl.conn", "DEBUG");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.impl.client", "DEBUG");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.client", "DEBUG");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http", "DEBUG");

The trace work when I invoke the client from within the console application, instead nothing is logged when the client is invoked from within the web application.

I try to use fiddler to see what travel on the wire but there are problem with the HTTPS.

There is some known issue with this scenario?

Thanks

Ciao

Emiliano Carlesi

Email: emiliano.carlesi@itattitude.com
Lync: emiliano.carlesi@itattitude.com
Mobile: +39 3487837153
Phone: +39 0650939115

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


Re: RE: There are known problems of running HttpClient in a web application?

Posted by "bit1129@163.com" <bi...@163.com>.
Hi Emiliano and all,

I encounter this problem also, I am using a junit test  that issuing http requests, like following.  I would ask where we can see the httpclient log after setting these system properties.
 @Test 
public void testHttpClientPool() throws Exception { 

System.setProperty("org.apache.commons.logging.Log","org.apache.commons.logging.impl.SimpleLog"); 
System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); 
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.wire", "DEBUG"); 
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.impl.conn", "DEBUG"); 
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.impl.client", "DEBUG"); 
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.client", "DEBUG"); 
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http", "DEBUG");
///http client call here
}

I think the http output should be on the console,but it is not there. Any guide on this ?Thanks!



bit1129@163.com
 
From: Emiliano Carlesi
Date: 2015-05-30 05:14
To: HttpClient User Discussion
CC: Emiliano Carlesi
Subject: RE: There are known problems of running HttpClient in a web application?
Hello. Problem solved. It was a problem with a reference (different version of the same jar) :-(
 
Thanks to all, especially to Stefan
 
Ciao
 
Emiliano Carlesi
 
Email: emiliano.carlesi@itattitude.com
Lync: emiliano.carlesi@itattitude.com
Mobile: +39 3487837153
Phone: +39 0650939115
 
 
 
-----Original Message-----
From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com] 
Sent: Friday, May 29, 2015 1:08 AM
To: HttpClient User Discussion
Subject: Re: There are known problems of running HttpClient in a web application?
 
Ok. Is tomcat shipping a bridge?
 
Sendt fra min iPhone
 
> Den 29. mai 2015 kl. 00.43 skrev Emiliano Carlesi <em...@itattitude.com>:
> 
> No, I understand the following line redirect the log trace to stderr
> 
> System.setProperty("org.apache.commons.logging.Log", 
> "org.apache.commons.logging.impl.SimpleLog");
> 
> Isn't right?
> 
> 
> 
> Emiliano Carlesi
> 
> Email: emiliano.carlesi@itattitude.com
> Lync: emiliano.carlesi@itattitude.com
> Mobile: +39 3487837153
> Phone: +39 0650939115
> 
> 
> 
> -----Original Message-----
> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com]
> Sent: Friday, May 29, 2015 12:17 AM
> To: HttpClient User Discussion
> Subject: Re: There are known problems of running HttpClient in a web application?
> 
> have you set up log bridging from commons logging to log4j2?
> 
> 2015-05-29 0:07 GMT+02:00 Emiliano Carlesi 
> <em...@itattitude.com>
> :
> 
>> I'm debugging my web app using Eclipse Luna and Apache Tomcat 7.0.59.
>> 
>> 
>> 
>> Emiliano Carlesi
>> 
>> Email: emiliano.carlesi@itattitude.com
>> Lync: emiliano.carlesi@itattitude.com
>> Mobile: +39 3487837153
>> Phone: +39 0650939115
>> 
>> 
>> 
>> -----Original Message-----
>> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com]
>> Sent: Friday, May 29, 2015 12:00 AM
>> To: HttpClient User Discussion
>> Subject: Re: There are known problems of running HttpClient in a web 
>> application?
>> 
>> What server are you running on?
>> 
>> 2015-05-28 23:58 GMT+02:00 Stefan Magnus Landrø <st...@gmail.com>:
>> 
>>> What logging framework are you using?
>>> 
>>> 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <
>>> emiliano.carlesi@itattitude.com>:
>>> 
>>>> Hi to all,
>>>> I have a problem I can't understand related to the execution of 
>>>> HttpClient 4 within a web application running in Tomcat + Struts2.
>>>> 
>>>> I create an HTTP client for a specific site that uses basic 
>>>> authentication over HTTPS.
>>>> While execute my client from a console application,  it works properly.
>>>> When I try to use the client from within the web application I 
>>>> always get an HTTP 301 result code from the web server.
>>>> 
>>>> I have no access to the server logs.
>>>> 
>>>> I try to enable the trace using these  instruction:
>>>> 
>>>> 
>>>> System.setProperty("org.apache.commons.logging.Log","org.apache.com
>>>> mo
>>>> ns.logging.impl.SimpleLog");
>>>> System.setProperty("org.apache.commons.logging.simplelog.showdateti
>>>> me
>>>> ",
>>>> "true");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.wire",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.impl.conn",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.impl.client",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.client",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http",
>>>> "DEBUG");
>>>> 
>>>> The trace work when I invoke the client from within the console 
>>>> application, instead nothing is logged when the client is invoked 
>>>> from within the web application.
>>>> 
>>>> I try to use fiddler to see what travel on the wire but there are 
>>>> problem with the HTTPS.
>>>> 
>>>> There is some known issue with this scenario?
>>>> 
>>>> Thanks
>>>> 
>>>> Ciao
>>>> 
>>>> Emiliano Carlesi
>>>> 
>>>> Email: emiliano.carlesi@itattitude.com
>>>> Lync: emiliano.carlesi@itattitude.com
>>>> Mobile: +39 3487837153
>>>> Phone: +39 0650939115
>>>> 
>>>> -------------------------------------------------------------------
>>>> -- To unsubscribe, e-mail: 
>>>> httpclient-users-unsubscribe@hc.apache.org
>>>> For additional commands, e-mail: 
>>>> httpclient-users-help@hc.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> BEKK Open
>>> http://open.bekk.no
>>> 
>>> TesTcl - a unit test framework for iRules http://testcl.com
>>> 
>> 
>> 
>> 
>> --
>> BEKK Open
>> http://open.bekk.no
>> 
>> TesTcl - a unit test framework for iRules http://testcl.com
>> 
> 
> 
> 
> --
> BEKK Open
> http://open.bekk.no
> 
> TesTcl - a unit test framework for iRules http://testcl.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: There are known problems of running HttpClient in a web application?

Posted by Emiliano Carlesi <em...@itattitude.com>.
Hello. Problem solved. It was a problem with a reference (different version of the same jar) :-(

Thanks to all, especially to Stefan

Ciao

Emiliano Carlesi

Email: emiliano.carlesi@itattitude.com
Lync: emiliano.carlesi@itattitude.com
Mobile: +39 3487837153
Phone: +39 0650939115



-----Original Message-----
From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com] 
Sent: Friday, May 29, 2015 1:08 AM
To: HttpClient User Discussion
Subject: Re: There are known problems of running HttpClient in a web application?

Ok. Is tomcat shipping a bridge?

Sendt fra min iPhone

> Den 29. mai 2015 kl. 00.43 skrev Emiliano Carlesi <em...@itattitude.com>:
> 
> No, I understand the following line redirect the log trace to stderr
> 
> System.setProperty("org.apache.commons.logging.Log", 
> "org.apache.commons.logging.impl.SimpleLog");
> 
> Isn't right?
> 
> 
> 
> Emiliano Carlesi
> 
> Email: emiliano.carlesi@itattitude.com
> Lync: emiliano.carlesi@itattitude.com
> Mobile: +39 3487837153
> Phone: +39 0650939115
> 
> 
> 
> -----Original Message-----
> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com]
> Sent: Friday, May 29, 2015 12:17 AM
> To: HttpClient User Discussion
> Subject: Re: There are known problems of running HttpClient in a web application?
> 
> have you set up log bridging from commons logging to log4j2?
> 
> 2015-05-29 0:07 GMT+02:00 Emiliano Carlesi 
> <em...@itattitude.com>
> :
> 
>> I'm debugging my web app using Eclipse Luna and Apache Tomcat 7.0.59.
>> 
>> 
>> 
>> Emiliano Carlesi
>> 
>> Email: emiliano.carlesi@itattitude.com
>> Lync: emiliano.carlesi@itattitude.com
>> Mobile: +39 3487837153
>> Phone: +39 0650939115
>> 
>> 
>> 
>> -----Original Message-----
>> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com]
>> Sent: Friday, May 29, 2015 12:00 AM
>> To: HttpClient User Discussion
>> Subject: Re: There are known problems of running HttpClient in a web 
>> application?
>> 
>> What server are you running on?
>> 
>> 2015-05-28 23:58 GMT+02:00 Stefan Magnus Landrø <st...@gmail.com>:
>> 
>>> What logging framework are you using?
>>> 
>>> 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <
>>> emiliano.carlesi@itattitude.com>:
>>> 
>>>> Hi to all,
>>>> I have a problem I can't understand related to the execution of 
>>>> HttpClient 4 within a web application running in Tomcat + Struts2.
>>>> 
>>>> I create an HTTP client for a specific site that uses basic 
>>>> authentication over HTTPS.
>>>> While execute my client from a console application,  it works properly.
>>>> When I try to use the client from within the web application I 
>>>> always get an HTTP 301 result code from the web server.
>>>> 
>>>> I have no access to the server logs.
>>>> 
>>>> I try to enable the trace using these  instruction:
>>>> 
>>>> 
>>>> System.setProperty("org.apache.commons.logging.Log","org.apache.com
>>>> mo
>>>> ns.logging.impl.SimpleLog");
>>>> System.setProperty("org.apache.commons.logging.simplelog.showdateti
>>>> me
>>>> ",
>>>> "true");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.wire",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.impl.conn",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.impl.client",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.client",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http",
>>>> "DEBUG");
>>>> 
>>>> The trace work when I invoke the client from within the console 
>>>> application, instead nothing is logged when the client is invoked 
>>>> from within the web application.
>>>> 
>>>> I try to use fiddler to see what travel on the wire but there are 
>>>> problem with the HTTPS.
>>>> 
>>>> There is some known issue with this scenario?
>>>> 
>>>> Thanks
>>>> 
>>>> Ciao
>>>> 
>>>> Emiliano Carlesi
>>>> 
>>>> Email: emiliano.carlesi@itattitude.com
>>>> Lync: emiliano.carlesi@itattitude.com
>>>> Mobile: +39 3487837153
>>>> Phone: +39 0650939115
>>>> 
>>>> -------------------------------------------------------------------
>>>> -- To unsubscribe, e-mail: 
>>>> httpclient-users-unsubscribe@hc.apache.org
>>>> For additional commands, e-mail: 
>>>> httpclient-users-help@hc.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> BEKK Open
>>> http://open.bekk.no
>>> 
>>> TesTcl - a unit test framework for iRules http://testcl.com
>>> 
>> 
>> 
>> 
>> --
>> BEKK Open
>> http://open.bekk.no
>> 
>> TesTcl - a unit test framework for iRules http://testcl.com
>> 
> 
> 
> 
> --
> BEKK Open
> http://open.bekk.no
> 
> TesTcl - a unit test framework for iRules http://testcl.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: There are known problems of running HttpClient in a web application?

Posted by Emiliano Carlesi <em...@itattitude.com>.
Hi Stefan, 
As first, thanks for your time :-)

About your question.  I'm not sure to know the response :-(

I have not good knowledge of the java logging infrastructure (before this reply I study something just to be sure to understand your question) and I fear some problems can be related to these references: slf4j-api-1.5.8.jar and slf4j-jdk14-1.5.8.jar.  It's possible?
 
Thanks againg for your help!

Ciao

Emiliano Carlesi

Email: emiliano.carlesi@itattitude.com
Lync: emiliano.carlesi@itattitude.com
Mobile: +39 3487837153
Phone: +39 0650939115



-----Original Message-----
From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com] 
Sent: Friday, May 29, 2015 1:08 AM
To: HttpClient User Discussion
Subject: Re: There are known problems of running HttpClient in a web application?

Ok. Is tomcat shipping a bridge?

Sendt fra min iPhone

> Den 29. mai 2015 kl. 00.43 skrev Emiliano Carlesi <em...@itattitude.com>:
> 
> No, I understand the following line redirect the log trace to stderr
> 
> System.setProperty("org.apache.commons.logging.Log", 
> "org.apache.commons.logging.impl.SimpleLog");
> 
> Isn't right?
> 
> 
> 
> Emiliano Carlesi
> 
> Email: emiliano.carlesi@itattitude.com
> Lync: emiliano.carlesi@itattitude.com
> Mobile: +39 3487837153
> Phone: +39 0650939115
> 
> 
> 
> -----Original Message-----
> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com]
> Sent: Friday, May 29, 2015 12:17 AM
> To: HttpClient User Discussion
> Subject: Re: There are known problems of running HttpClient in a web application?
> 
> have you set up log bridging from commons logging to log4j2?
> 
> 2015-05-29 0:07 GMT+02:00 Emiliano Carlesi 
> <em...@itattitude.com>
> :
> 
>> I'm debugging my web app using Eclipse Luna and Apache Tomcat 7.0.59.
>> 
>> 
>> 
>> Emiliano Carlesi
>> 
>> Email: emiliano.carlesi@itattitude.com
>> Lync: emiliano.carlesi@itattitude.com
>> Mobile: +39 3487837153
>> Phone: +39 0650939115
>> 
>> 
>> 
>> -----Original Message-----
>> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com]
>> Sent: Friday, May 29, 2015 12:00 AM
>> To: HttpClient User Discussion
>> Subject: Re: There are known problems of running HttpClient in a web 
>> application?
>> 
>> What server are you running on?
>> 
>> 2015-05-28 23:58 GMT+02:00 Stefan Magnus Landrø <st...@gmail.com>:
>> 
>>> What logging framework are you using?
>>> 
>>> 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <
>>> emiliano.carlesi@itattitude.com>:
>>> 
>>>> Hi to all,
>>>> I have a problem I can't understand related to the execution of 
>>>> HttpClient 4 within a web application running in Tomcat + Struts2.
>>>> 
>>>> I create an HTTP client for a specific site that uses basic 
>>>> authentication over HTTPS.
>>>> While execute my client from a console application,  it works properly.
>>>> When I try to use the client from within the web application I 
>>>> always get an HTTP 301 result code from the web server.
>>>> 
>>>> I have no access to the server logs.
>>>> 
>>>> I try to enable the trace using these  instruction:
>>>> 
>>>> 
>>>> System.setProperty("org.apache.commons.logging.Log","org.apache.com
>>>> mo
>>>> ns.logging.impl.SimpleLog");
>>>> System.setProperty("org.apache.commons.logging.simplelog.showdateti
>>>> me
>>>> ",
>>>> "true");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.wire",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.impl.conn",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.impl.client",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.client",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http",
>>>> "DEBUG");
>>>> 
>>>> The trace work when I invoke the client from within the console 
>>>> application, instead nothing is logged when the client is invoked 
>>>> from within the web application.
>>>> 
>>>> I try to use fiddler to see what travel on the wire but there are 
>>>> problem with the HTTPS.
>>>> 
>>>> There is some known issue with this scenario?
>>>> 
>>>> Thanks
>>>> 
>>>> Ciao
>>>> 
>>>> Emiliano Carlesi
>>>> 
>>>> Email: emiliano.carlesi@itattitude.com
>>>> Lync: emiliano.carlesi@itattitude.com
>>>> Mobile: +39 3487837153
>>>> Phone: +39 0650939115
>>>> 
>>>> -------------------------------------------------------------------
>>>> -- To unsubscribe, e-mail: 
>>>> httpclient-users-unsubscribe@hc.apache.org
>>>> For additional commands, e-mail: 
>>>> httpclient-users-help@hc.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> BEKK Open
>>> http://open.bekk.no
>>> 
>>> TesTcl - a unit test framework for iRules http://testcl.com
>>> 
>> 
>> 
>> 
>> --
>> BEKK Open
>> http://open.bekk.no
>> 
>> TesTcl - a unit test framework for iRules http://testcl.com
>> 
> 
> 
> 
> --
> BEKK Open
> http://open.bekk.no
> 
> TesTcl - a unit test framework for iRules http://testcl.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


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


Re: There are known problems of running HttpClient in a web application?

Posted by Stefan Magnus Landrø <st...@gmail.com>.
Ok. Is tomcat shipping a bridge?

Sendt fra min iPhone

> Den 29. mai 2015 kl. 00.43 skrev Emiliano Carlesi <em...@itattitude.com>:
> 
> No, I understand the following line redirect the log trace to stderr
> 
> System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
> 
> Isn't right?
> 
> 
> 
> Emiliano Carlesi
> 
> Email: emiliano.carlesi@itattitude.com
> Lync: emiliano.carlesi@itattitude.com
> Mobile: +39 3487837153
> Phone: +39 0650939115
> 
> 
> 
> -----Original Message-----
> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com] 
> Sent: Friday, May 29, 2015 12:17 AM
> To: HttpClient User Discussion
> Subject: Re: There are known problems of running HttpClient in a web application?
> 
> have you set up log bridging from commons logging to log4j2?
> 
> 2015-05-29 0:07 GMT+02:00 Emiliano Carlesi <em...@itattitude.com>
> :
> 
>> I'm debugging my web app using Eclipse Luna and Apache Tomcat 7.0.59.
>> 
>> 
>> 
>> Emiliano Carlesi
>> 
>> Email: emiliano.carlesi@itattitude.com
>> Lync: emiliano.carlesi@itattitude.com
>> Mobile: +39 3487837153
>> Phone: +39 0650939115
>> 
>> 
>> 
>> -----Original Message-----
>> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com]
>> Sent: Friday, May 29, 2015 12:00 AM
>> To: HttpClient User Discussion
>> Subject: Re: There are known problems of running HttpClient in a web 
>> application?
>> 
>> What server are you running on?
>> 
>> 2015-05-28 23:58 GMT+02:00 Stefan Magnus Landrø <st...@gmail.com>:
>> 
>>> What logging framework are you using?
>>> 
>>> 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <
>>> emiliano.carlesi@itattitude.com>:
>>> 
>>>> Hi to all,
>>>> I have a problem I can't understand related to the execution of 
>>>> HttpClient 4 within a web application running in Tomcat + Struts2.
>>>> 
>>>> I create an HTTP client for a specific site that uses basic 
>>>> authentication over HTTPS.
>>>> While execute my client from a console application,  it works properly.
>>>> When I try to use the client from within the web application I 
>>>> always get an HTTP 301 result code from the web server.
>>>> 
>>>> I have no access to the server logs.
>>>> 
>>>> I try to enable the trace using these  instruction:
>>>> 
>>>> 
>>>> System.setProperty("org.apache.commons.logging.Log","org.apache.com
>>>> mo
>>>> ns.logging.impl.SimpleLog");
>>>> System.setProperty("org.apache.commons.logging.simplelog.showdateti
>>>> me
>>>> ",
>>>> "true");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.wire",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.impl.conn",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.impl.client",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http.client",
>>>> "DEBUG");
>>>> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
>>>> ac
>>>> he.http",
>>>> "DEBUG");
>>>> 
>>>> The trace work when I invoke the client from within the console 
>>>> application, instead nothing is logged when the client is invoked 
>>>> from within the web application.
>>>> 
>>>> I try to use fiddler to see what travel on the wire but there are 
>>>> problem with the HTTPS.
>>>> 
>>>> There is some known issue with this scenario?
>>>> 
>>>> Thanks
>>>> 
>>>> Ciao
>>>> 
>>>> Emiliano Carlesi
>>>> 
>>>> Email: emiliano.carlesi@itattitude.com
>>>> Lync: emiliano.carlesi@itattitude.com
>>>> Mobile: +39 3487837153
>>>> Phone: +39 0650939115
>>>> 
>>>> -------------------------------------------------------------------
>>>> -- To unsubscribe, e-mail: 
>>>> httpclient-users-unsubscribe@hc.apache.org
>>>> For additional commands, e-mail: 
>>>> httpclient-users-help@hc.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> BEKK Open
>>> http://open.bekk.no
>>> 
>>> TesTcl - a unit test framework for iRules http://testcl.com
>>> 
>> 
>> 
>> 
>> --
>> BEKK Open
>> http://open.bekk.no
>> 
>> TesTcl - a unit test framework for iRules http://testcl.com
>> 
> 
> 
> 
> --
> BEKK Open
> http://open.bekk.no
> 
> TesTcl - a unit test framework for iRules http://testcl.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: There are known problems of running HttpClient in a web application?

Posted by Emiliano Carlesi <em...@itattitude.com>.
No, I understand the following line redirect the log trace to stderr

System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");

Isn't right?



Emiliano Carlesi

Email: emiliano.carlesi@itattitude.com
Lync: emiliano.carlesi@itattitude.com
Mobile: +39 3487837153
Phone: +39 0650939115



-----Original Message-----
From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com] 
Sent: Friday, May 29, 2015 12:17 AM
To: HttpClient User Discussion
Subject: Re: There are known problems of running HttpClient in a web application?

have you set up log bridging from commons logging to log4j2?

2015-05-29 0:07 GMT+02:00 Emiliano Carlesi <em...@itattitude.com>
:

> I'm debugging my web app using Eclipse Luna and Apache Tomcat 7.0.59.
>
>
>
> Emiliano Carlesi
>
> Email: emiliano.carlesi@itattitude.com
> Lync: emiliano.carlesi@itattitude.com
> Mobile: +39 3487837153
> Phone: +39 0650939115
>
>
>
> -----Original Message-----
> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com]
> Sent: Friday, May 29, 2015 12:00 AM
> To: HttpClient User Discussion
> Subject: Re: There are known problems of running HttpClient in a web 
> application?
>
> What server are you running on?
>
> 2015-05-28 23:58 GMT+02:00 Stefan Magnus Landrø <st...@gmail.com>:
>
> > What logging framework are you using?
> >
> > 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <
> > emiliano.carlesi@itattitude.com>:
> >
> >> Hi to all,
> >> I have a problem I can't understand related to the execution of 
> >> HttpClient 4 within a web application running in Tomcat + Struts2.
> >>
> >> I create an HTTP client for a specific site that uses basic 
> >> authentication over HTTPS.
> >> While execute my client from a console application,  it works properly.
> >> When I try to use the client from within the web application I 
> >> always get an HTTP 301 result code from the web server.
> >>
> >> I have no access to the server logs.
> >>
> >> I try to enable the trace using these  instruction:
> >>
> >>
> >> System.setProperty("org.apache.commons.logging.Log","org.apache.com
> >> mo
> >> ns.logging.impl.SimpleLog");
> >> System.setProperty("org.apache.commons.logging.simplelog.showdateti
> >> me
> >> ",
> >> "true");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
> >> ac
> >> he.http.wire",
> >> "DEBUG");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
> >> ac
> >> he.http.impl.conn",
> >> "DEBUG");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
> >> ac
> >> he.http.impl.client",
> >> "DEBUG");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
> >> ac
> >> he.http.client",
> >> "DEBUG");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.ap
> >> ac
> >> he.http",
> >> "DEBUG");
> >>
> >> The trace work when I invoke the client from within the console 
> >> application, instead nothing is logged when the client is invoked 
> >> from within the web application.
> >>
> >> I try to use fiddler to see what travel on the wire but there are 
> >> problem with the HTTPS.
> >>
> >> There is some known issue with this scenario?
> >>
> >> Thanks
> >>
> >> Ciao
> >>
> >> Emiliano Carlesi
> >>
> >> Email: emiliano.carlesi@itattitude.com
> >> Lync: emiliano.carlesi@itattitude.com
> >> Mobile: +39 3487837153
> >> Phone: +39 0650939115
> >>
> >> -------------------------------------------------------------------
> >> -- To unsubscribe, e-mail: 
> >> httpclient-users-unsubscribe@hc.apache.org
> >> For additional commands, e-mail: 
> >> httpclient-users-help@hc.apache.org
> >>
> >>
> >
> >
> > --
> > BEKK Open
> > http://open.bekk.no
> >
> > TesTcl - a unit test framework for iRules http://testcl.com
> >
>
>
>
> --
> BEKK Open
> http://open.bekk.no
>
> TesTcl - a unit test framework for iRules http://testcl.com
>



--
BEKK Open
http://open.bekk.no

TesTcl - a unit test framework for iRules http://testcl.com

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


Re: There are known problems of running HttpClient in a web application?

Posted by Stefan Magnus Landrø <st...@gmail.com>.
have you set up log bridging from commons logging to log4j2?

2015-05-29 0:07 GMT+02:00 Emiliano Carlesi <em...@itattitude.com>
:

> I'm debugging my web app using Eclipse Luna and Apache Tomcat 7.0.59.
>
>
>
> Emiliano Carlesi
>
> Email: emiliano.carlesi@itattitude.com
> Lync: emiliano.carlesi@itattitude.com
> Mobile: +39 3487837153
> Phone: +39 0650939115
>
>
>
> -----Original Message-----
> From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com]
> Sent: Friday, May 29, 2015 12:00 AM
> To: HttpClient User Discussion
> Subject: Re: There are known problems of running HttpClient in a web
> application?
>
> What server are you running on?
>
> 2015-05-28 23:58 GMT+02:00 Stefan Magnus Landrø <st...@gmail.com>:
>
> > What logging framework are you using?
> >
> > 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <
> > emiliano.carlesi@itattitude.com>:
> >
> >> Hi to all,
> >> I have a problem I can't understand related to the execution of
> >> HttpClient 4 within a web application running in Tomcat + Struts2.
> >>
> >> I create an HTTP client for a specific site that uses basic
> >> authentication over HTTPS.
> >> While execute my client from a console application,  it works properly.
> >> When I try to use the client from within the web application I always
> >> get an HTTP 301 result code from the web server.
> >>
> >> I have no access to the server logs.
> >>
> >> I try to enable the trace using these  instruction:
> >>
> >>
> >> System.setProperty("org.apache.commons.logging.Log","org.apache.commo
> >> ns.logging.impl.SimpleLog");
> >> System.setProperty("org.apache.commons.logging.simplelog.showdatetime
> >> ",
> >> "true");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
> >> he.http.wire",
> >> "DEBUG");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
> >> he.http.impl.conn",
> >> "DEBUG");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
> >> he.http.impl.client",
> >> "DEBUG");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
> >> he.http.client",
> >> "DEBUG");
> >> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
> >> he.http",
> >> "DEBUG");
> >>
> >> The trace work when I invoke the client from within the console
> >> application, instead nothing is logged when the client is invoked
> >> from within the web application.
> >>
> >> I try to use fiddler to see what travel on the wire but there are
> >> problem with the HTTPS.
> >>
> >> There is some known issue with this scenario?
> >>
> >> Thanks
> >>
> >> Ciao
> >>
> >> Emiliano Carlesi
> >>
> >> Email: emiliano.carlesi@itattitude.com
> >> Lync: emiliano.carlesi@itattitude.com
> >> Mobile: +39 3487837153
> >> Phone: +39 0650939115
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> >> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> >>
> >>
> >
> >
> > --
> > BEKK Open
> > http://open.bekk.no
> >
> > TesTcl - a unit test framework for iRules http://testcl.com
> >
>
>
>
> --
> BEKK Open
> http://open.bekk.no
>
> TesTcl - a unit test framework for iRules http://testcl.com
>



-- 
BEKK Open
http://open.bekk.no

TesTcl - a unit test framework for iRules
http://testcl.com

RE: There are known problems of running HttpClient in a web application?

Posted by Emiliano Carlesi <em...@itattitude.com>.
I'm debugging my web app using Eclipse Luna and Apache Tomcat 7.0.59.



Emiliano Carlesi

Email: emiliano.carlesi@itattitude.com
Lync: emiliano.carlesi@itattitude.com
Mobile: +39 3487837153
Phone: +39 0650939115



-----Original Message-----
From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com] 
Sent: Friday, May 29, 2015 12:00 AM
To: HttpClient User Discussion
Subject: Re: There are known problems of running HttpClient in a web application?

What server are you running on?

2015-05-28 23:58 GMT+02:00 Stefan Magnus Landrø <st...@gmail.com>:

> What logging framework are you using?
>
> 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <
> emiliano.carlesi@itattitude.com>:
>
>> Hi to all,
>> I have a problem I can't understand related to the execution of 
>> HttpClient 4 within a web application running in Tomcat + Struts2.
>>
>> I create an HTTP client for a specific site that uses basic 
>> authentication over HTTPS.
>> While execute my client from a console application,  it works properly.
>> When I try to use the client from within the web application I always 
>> get an HTTP 301 result code from the web server.
>>
>> I have no access to the server logs.
>>
>> I try to enable the trace using these  instruction:
>>
>>
>> System.setProperty("org.apache.commons.logging.Log","org.apache.commo
>> ns.logging.impl.SimpleLog"); 
>> System.setProperty("org.apache.commons.logging.simplelog.showdatetime
>> ",
>> "true");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
>> he.http.wire",
>> "DEBUG");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
>> he.http.impl.conn",
>> "DEBUG");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
>> he.http.impl.client",
>> "DEBUG");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
>> he.http.client",
>> "DEBUG");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apac
>> he.http",
>> "DEBUG");
>>
>> The trace work when I invoke the client from within the console 
>> application, instead nothing is logged when the client is invoked 
>> from within the web application.
>>
>> I try to use fiddler to see what travel on the wire but there are 
>> problem with the HTTPS.
>>
>> There is some known issue with this scenario?
>>
>> Thanks
>>
>> Ciao
>>
>> Emiliano Carlesi
>>
>> Email: emiliano.carlesi@itattitude.com
>> Lync: emiliano.carlesi@itattitude.com
>> Mobile: +39 3487837153
>> Phone: +39 0650939115
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>>
>
>
> --
> BEKK Open
> http://open.bekk.no
>
> TesTcl - a unit test framework for iRules http://testcl.com
>



--
BEKK Open
http://open.bekk.no

TesTcl - a unit test framework for iRules http://testcl.com

Re: There are known problems of running HttpClient in a web application?

Posted by Stefan Magnus Landrø <st...@gmail.com>.
What server are you running on?

2015-05-28 23:58 GMT+02:00 Stefan Magnus Landrø <st...@gmail.com>:

> What logging framework are you using?
>
> 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <
> emiliano.carlesi@itattitude.com>:
>
>> Hi to all,
>> I have a problem I can't understand related to the execution of
>> HttpClient 4 within a web application running in Tomcat + Struts2.
>>
>> I create an HTTP client for a specific site that uses basic
>> authentication over HTTPS.
>> While execute my client from a console application,  it works properly.
>> When I try to use the client from within the web application I always get
>> an HTTP 301 result code from the web server.
>>
>> I have no access to the server logs.
>>
>> I try to enable the trace using these  instruction:
>>
>>
>> System.setProperty("org.apache.commons.logging.Log","org.apache.commons.logging.impl.SimpleLog");
>> System.setProperty("org.apache.commons.logging.simplelog.showdatetime",
>> "true");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.wire",
>> "DEBUG");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.impl.conn",
>> "DEBUG");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.impl.client",
>> "DEBUG");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.client",
>> "DEBUG");
>> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http",
>> "DEBUG");
>>
>> The trace work when I invoke the client from within the console
>> application, instead nothing is logged when the client is invoked from
>> within the web application.
>>
>> I try to use fiddler to see what travel on the wire but there are problem
>> with the HTTPS.
>>
>> There is some known issue with this scenario?
>>
>> Thanks
>>
>> Ciao
>>
>> Emiliano Carlesi
>>
>> Email: emiliano.carlesi@itattitude.com
>> Lync: emiliano.carlesi@itattitude.com
>> Mobile: +39 3487837153
>> Phone: +39 0650939115
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>>
>
>
> --
> BEKK Open
> http://open.bekk.no
>
> TesTcl - a unit test framework for iRules
> http://testcl.com
>



-- 
BEKK Open
http://open.bekk.no

TesTcl - a unit test framework for iRules
http://testcl.com

RE: There are known problems of running HttpClient in a web application?

Posted by Emiliano Carlesi <em...@itattitude.com>.
Log4j2



Emiliano Carlesi

Email: emiliano.carlesi@itattitude.com
Lync: emiliano.carlesi@itattitude.com
Mobile: +39 3487837153
Phone: +39 0650939115



-----Original Message-----
From: Stefan Magnus Landrø [mailto:stefan.landro@gmail.com] 
Sent: Thursday, May 28, 2015 11:59 PM
To: HttpClient User Discussion
Subject: Re: There are known problems of running HttpClient in a web application?

What logging framework are you using?

2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <emiliano.carlesi@itattitude.com
>:

> Hi to all,
> I have a problem I can't understand related to the execution of 
> HttpClient
> 4 within a web application running in Tomcat + Struts2.
>
> I create an HTTP client for a specific site that uses basic 
> authentication over HTTPS.
> While execute my client from a console application,  it works properly.
> When I try to use the client from within the web application I always 
> get an HTTP 301 result code from the web server.
>
> I have no access to the server logs.
>
> I try to enable the trace using these  instruction:
>
>
> System.setProperty("org.apache.commons.logging.Log","org.apache.common
> s.logging.impl.SimpleLog"); 
> System.setProperty("org.apache.commons.logging.simplelog.showdatetime"
> ,
> "true");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apach
> e.http.wire",
> "DEBUG");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apach
> e.http.impl.conn",
> "DEBUG");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apach
> e.http.impl.client",
> "DEBUG");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apach
> e.http.client",
> "DEBUG");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apach
> e.http",
> "DEBUG");
>
> The trace work when I invoke the client from within the console 
> application, instead nothing is logged when the client is invoked from 
> within the web application.
>
> I try to use fiddler to see what travel on the wire but there are 
> problem with the HTTPS.
>
> There is some known issue with this scenario?
>
> Thanks
>
> Ciao
>
> Emiliano Carlesi
>
> Email: emiliano.carlesi@itattitude.com
> Lync: emiliano.carlesi@itattitude.com
> Mobile: +39 3487837153
> Phone: +39 0650939115
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>


--
BEKK Open
http://open.bekk.no

TesTcl - a unit test framework for iRules http://testcl.com

Re: There are known problems of running HttpClient in a web application?

Posted by Stefan Magnus Landrø <st...@gmail.com>.
What logging framework are you using?

2015-05-28 23:43 GMT+02:00 Emiliano Carlesi <emiliano.carlesi@itattitude.com
>:

> Hi to all,
> I have a problem I can't understand related to the execution of HttpClient
> 4 within a web application running in Tomcat + Struts2.
>
> I create an HTTP client for a specific site that uses basic authentication
> over HTTPS.
> While execute my client from a console application,  it works properly.
> When I try to use the client from within the web application I always get
> an HTTP 301 result code from the web server.
>
> I have no access to the server logs.
>
> I try to enable the trace using these  instruction:
>
>
> System.setProperty("org.apache.commons.logging.Log","org.apache.commons.logging.impl.SimpleLog");
> System.setProperty("org.apache.commons.logging.simplelog.showdatetime",
> "true");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.wire",
> "DEBUG");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.impl.conn",
> "DEBUG");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.impl.client",
> "DEBUG");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.client",
> "DEBUG");
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http",
> "DEBUG");
>
> The trace work when I invoke the client from within the console
> application, instead nothing is logged when the client is invoked from
> within the web application.
>
> I try to use fiddler to see what travel on the wire but there are problem
> with the HTTPS.
>
> There is some known issue with this scenario?
>
> Thanks
>
> Ciao
>
> Emiliano Carlesi
>
> Email: emiliano.carlesi@itattitude.com
> Lync: emiliano.carlesi@itattitude.com
> Mobile: +39 3487837153
> Phone: +39 0650939115
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>


-- 
BEKK Open
http://open.bekk.no

TesTcl - a unit test framework for iRules
http://testcl.com