hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Glück <ortwin.glu...@nose.ch>
Subject Re: protocol support
Date Fri, 10 Jan 2003 08:30:17 GMT
Maneesh,

You can register your own protocols via 
Protocol.registerProtocol(String, Protocol). However HttpClient is only 
meant to handle http and https. FTP, Gopher and others are not handled 
by HttpClient. The main use of registerProtocol method is to register 
custom SocketFactories. So you would mostly register protocols like 
'https1', 'https2' for different client certificates with SSL.

Odi

Maneesh Sharma wrote:
> Hi ,
> Can anyone tell me how do i get my program to support ftp,gopher and 
> other protocols? currently I am getting the following exception:
> java.lang.IllegalStateException: unsupported protocol: 'ftp'
> at 
> org.apache.commons.httpclient.Protocol.lazyRegisterProtocol(Protocol.java:188) 
> 
> at org.apache.commons.httpclient.Protocol.getProtocol(Protocol.java:150)
> at 
> org.apache.commons.httpclient.HostConfiguration.setHost(HostConfiguration.java:185) 
> 
> at 
> org.apache.commons.httpclient.HostConfiguration.setHost(HostConfiguration.java:221) 
> 
> at GTest.dispatch(GTest.java:750)
> at GTest.execute(GTest.java:571)
> at org.apache.tools.ant.Task.perform(Task.java:319)
> at org.apache.tools.ant.Target.execute(Target.java:309)
> at org.apache.tools.ant.Target.performTasks(Target.java:336)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
> at org.apache.tools.ant.Main.runBuild(Main.java:610)
> at org.apache.tools.ant.Main.start(Main.java:196)
> at org.apache.tools.ant.Main.main(Main.java:235)
> 
> 
> TIA
> Maneesh.
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:commons-httpclient-dev-help@jakarta.apache.org>

-- 
_________________________________________________________________
  NOSE applied intelligence ag
                                    [www]      http://www.nose.ch
  ortwin glück                      [email] ortwin.glueck@nose.ch
  hardturmstrasse 171               [pgp key]          0x81CF3416
  8005 zurich                       [office]      +41-1-277 57 35
  switzerland                       [fax]         +41-1-277 57 12


Mime
View raw message