List Info

Thread: Example: Connection timed out




Example: Connection timed out
user name
2006-03-13 13:22:00
Hi
The commandline client works fine for some WebDAV
connections.
I'd like to have a servlet which can access as well to
WebDAV Server. I 
do it like:
try {
             HttpURL hrl = new HttpURL("http://192.168.0.1/pages/");
            
hrl.setUserinfo("user","pwd");
             WebdavResource wdr = new WebdavResource(hrl);
             File fn = new File("314Test.txt");
             wdr.getMethod(fn);
             wdr.close();

          }
          catch(MalformedURLException mue) {
            out.println("Malformed URL Fehler
"+mue);
          }
          catch(HttpException he){
            out.println("Http Fehler "+he);
          }
          catch(IOException ioe){
            out.println("IO Fehler "+ioe);
          }

The servlet can't connect.
java.net.ConnectException: Connection timed out: connect

Whats wrong in my code? Do I have to open some specific
ports on the
firewall except 80? I haven't done any configuration
because the 
commandline client is running.

Thanks Michael



------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )