hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mahamood, Saad (SD)" <SaadAli.Maham...@wales.gsi.gov.uk>
Subject HTTP 302 Console output handle question
Date Tue, 11 May 2004 12:31:15 GMT

Hello all!

I'm currently developing an application that uses the HTTPClient library.
I've found that whilst using it to return the status codes of URI's that
when it encouters a 302 return code it also gives out additional information
on the console as well:


10-May-2004 12:32:46 org.apache.commons.httpclient.HttpMethodBase
checkValidRedirect
WARNING: Error getting URI host
org.apache.commons.httpclient.HttpException: Redirect from host
www.bgis.gov.bb to www.barbados.gov.bb is not supported
	at
org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMethodBa
se.java:1243)
	at
org.apache.commons.httpclient.HttpMethodBase.processRedirectResponse(HttpMet
hodBase.java:1191)
	at
org.apache.commons.httpclient.HttpMethodBase.isRetryNeeded(HttpMethodBase.ja
va:977)
	at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:109
5)
	at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:675)
	at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529)
	at URLStatusCheck.run(URLStatusCheck.java:57)
	at FrontGUI$TimerListen.actionPerformed(FrontGUI.java:292)
	at javax.swing.Timer.fireActionPerformed(Unknown Source)
	at javax.swing.Timer$DoPostEvent.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
10-May-2004 12:32:46 org.apache.commons.httpclient.HttpMethodBase
processRedirectResponse
WARNING: Invalid Redirect URI from: http://www.bgis.gov.bb:80/ to:
http://www.barbados.gov.bb/bgis.htm



My question is, how do I get a handle on this output within in my code?
Since I want to be  able to display to the end user the redirected website
that they should be referencing to. 

The website below talks somthing about logging, but again I have no idea how
to use it:

http://jakarta.apache.org/commons/httpclient/logging.html


Thanks for you time!

Cheers,

Saad.

The original of this email was scanned for viruses by the Government Secure Intranet (GSi)
virus scanning service supplied exclusively by Energis in partnership with MessageLabs.

On leaving the GSi this email was certified virus-free

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message