You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Michael Arnold <mi...@sisag.ch> on 2006/03/07 14:40:39 UTC
cmdline Client open error
Hi
When I try to open a http url with the command line client I get the
following error:
connect http://192.168.0.1
Fatal Error: null
java.lang.NullPointerException
....
ccording to the docs I have to type open http-url
Please help
Thanks Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Connection timed out
Posted by Michael Arnold <mi...@sisag.ch>.
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-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: cmdline Client open error []
Posted by Michael Arnold <mi...@sisag.ch>.
I found the error. I had to point to a subdirectory. The commandline
client is working.
Now I'd like to write my own client:
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);
}
But it 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?
Thanks Michael
Michael Arnold wrote:
> Hi
> When I try to open a http url with the command line client I get the
> following error:
> connect http://192.168.0.1
> Fatal Error: null
> java.lang.NullPointerException
> ....
>
> ccording to the docs I have to type open http-url
> Please help
> Thanks Michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>
>
--
Michael Arnold
SISAG
Seilbahnen und industr.
Sicherheitstechnik Tel.: +41 41 875 07 11
Postfach Fax.: +41 41 875 07 12
CH - 6460 Altdorf http://www.sisag.ch/sismedia
Switzerland mailto:michael.arnold@sisag.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org