List Info

Thread: Saving credentials between wdr method calls?




Saving credentials between wdr method calls?
user name
2006-04-24 16:10:51
If I have the following code:

WebdavResource wdr = null;
HttpURL hrl = null;
try {                        
    hrl = new HttpURL("http://myhost.com/slid
e/files/" );
    hrl.setUserinfo("username",
"password");
            
    wdr = new WebdavResource( hrl );
            
    System.out.println("-->First action.");
    wdr.list();
            
    System.out.println("-->Second action.");
    wdr.list();
            
} catch (Exception e) {
    //do something
}

I see that in each call to wdr.list() the resource is forced
to
authenticate. Is there a way to save the credentials between
method calls so that I only need to authenticate the first
time
and not all subsequent times?

Cheers,

Brandon

________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/r
eg/tag

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

Saving credentials between wdr method calls?
user name
2006-04-26 09:20:49
(quick tip)

Hello Brandon,

 I know that there is na http header named pre-authenticate.
If you set it
to true in the jackarta http client lib, maybe you're able
to do what you
need.

 Hope this helps,
 Miguel

-----Original Message-----
From: Brandon Dove [mailto:bcdoveureach.com] 
Sent: segunda-feira, 24 de Abril de 2006 17:11
To: slide-userjakarta.apache.org
Subject: Saving credentials between wdr method calls?

If I have the following code:

WebdavResource wdr = null;
HttpURL hrl = null;
try {                        
    hrl = new HttpURL("http://myhost.com/slid
e/files/" );
    hrl.setUserinfo("username",
"password");
            
    wdr = new WebdavResource( hrl );
            
    System.out.println("-->First action.");
    wdr.list();
            
    System.out.println("-->Second action.");
    wdr.list();
            
} catch (Exception e) {
    //do something
}

I see that in each call to wdr.list() the resource is forced
to
authenticate. Is there a way to save the credentials between
method calls so that I only need to authenticate the first
time
and not all subsequent times?

Cheers,

Brandon

________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/r
eg/tag

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


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

[1-2]

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