• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic