Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   NetworkCredential (http://www.velocityreviews.com/forums/t152200-networkcredential.html)

IveCal 04-17-2006 04:03 AM

NetworkCredential
 
Hello, guys... What is the Java equivalent class for NetworkCredential?
Please reply. Thanks


IveCal 04-17-2006 04:09 AM

Re: NetworkCredential
 
NetworkCredential by that way is a C# class.


Oliver Wong 04-17-2006 05:05 PM

Re: NetworkCredential
 
"IveCal" <ive.cal@gmail.com> wrote in message
news:1145246622.484974.197000@u72g2000cwu.googlegr oups.com...
> Hello, guys... What is the Java equivalent class for NetworkCredential?
> Please reply. Thanks
>


Crosspost; don't multipost:
http://www.cs.tut.fi/~jkorpela/usenet/xpost.html

- Oliver


Roedy Green 04-17-2006 11:24 PM

Re: NetworkCredential
 
On Mon, 17 Apr 2006 17:05:30 GMT, "Oliver Wong" <owong@castortech.com>
wrote, quoted or indirectly quoted someone who said :

> Crosspost; don't multipost:
>http://www.cs.tut.fi/~jkorpela/usenet/xpost.html


wasn't it you in that last post on the futility of making Internet
requests?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Oliver Wong 04-18-2006 01:29 PM

Re: NetworkCredential
 

"Roedy Green" <my_email_is_posted_on_my_website@munged.invalid > wrote in
message news:7t8842ppf0rardgkp86pmrkkb2pi1rj08o@4ax.com...
> On Mon, 17 Apr 2006 17:05:30 GMT, "Oliver Wong" <owong@castortech.com>
> wrote, quoted or indirectly quoted someone who said :
>
>> Crosspost; don't multipost:
>>http://www.cs.tut.fi/~jkorpela/usenet/xpost.html

>
> wasn't it you in that last post on the futility of making Internet
> requests?


Yes. I bet no matter how many times I post the above advice, we'll
always see another user make another multipost.

- Oliver


IveCal 04-20-2006 06:52 AM

Re: NetworkCredential
 
The code snippet below shows the use of NetworkCredential...
I'm curious over the object (networkCredential in this case) it creates
because it was used once only for authentication purposes... (exactly
before accessing the webpage...) Do you have any idea how is this going
to be implemented in Java? Thanks...

void Page_Load(Object sender, EventArgs e) {
XmlDocument doc = new XmlDocument();
NetworkCredential networkCredential = new
NetworkCredential("username","password"); ==> THIS IS WHAT I MEAN...

HttpWebRequest HttpWReq = (HttpWebRequest)WebRequest.Create(
"http://api.keyworddiscovery.com/free.php?q="
+ HttpUtility.UrlEncode(Request.Form["query"])
);
HttpWReq.PreAuthenticate = true;

HttpWReq.Credentials = networkCredential;

HttpWebResponse HttpWResp =
(HttpWebResponse)HttpWReq.GetResponse();

if (HttpWResp.StatusCode == HttpStatusCode.OK) {
doc.Load(HttpWResp.GetResponseStream());
}

XslTransform trans = new XslTransform();
trans.Load(Server.MapPath("output_template.xsl"));

xml1.Document = doc;
xml1.Transform = trans;
}


Oliver Wong 04-20-2006 02:42 PM

Re: NetworkCredential
 
"IveCal" <ive.cal@gmail.com> wrote in message
news:1145515970.769410.137350@i39g2000cwa.googlegr oups.com...
> The code snippet below shows the use of NetworkCredential...


To the OP:

Did you read the link at http://www.cs.tut.fi/~jkorpela/usenet/xpost.html ?
I posted an answer to you in another newsgroup already.

To Roedy:

I told you so.

- Oliver



All times are GMT. The time now is 03:45 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57