This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Read collection of URLs from HashMap and pass it to java.net.URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Read collection of URLs from HashMap and pass it to java.net.URL" Watch "Read collection of URLs from HashMap and pass it to java.net.URL" New topic
Author

Read collection of URLs from HashMap and pass it to java.net.URL

Rithanya Laxmi
Ranch Hand

Joined: Jan 24, 2011
Posts: 136
Hi,


I have a collection of URLs (both DEV & TEST) which contains respective username & password for that URL to be invoked, I want these details to be set in the respective Hashmap from where I can iterate and pass it to the respective URL class (with the URLs) with username & password. Please clarify how we can go about it with an example? Whether we can use Hashmap or ArrayList? Please clarify with an example.

Thanks.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10491
    
    9

To rephrase your problem, you are trying to figure out the user name/password pair for a given URL.

Whether we can use Hashmap or ArrayList? Please clarify with an example.

What do you think? Have you read the API docs for both these? Do you understand what type of scenarios they are designed for?

What have you tried so far and where are you stuck?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Read collection of URLs from HashMap and pass it to java.net.URL