Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

java hashmap 3 times the value

  • 27-07-2007 3:22pm
    #1
    Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭


    Im using a jsp to get a value from a hashmap.

    The problem is the value it's getting is 3 times what it should be.

    What could cause that?


Comments

  • Registered Users, Registered Users 2 Posts: 378 ✭✭sicruise


    Can you put up some of your code?

    The obvious answer is you multiplying it by 3 somewhere :)

    Are you using a jsp tag to itterate through the map?

    Try a bit of code like this, just to make sure you have the correct values in there...
    for ( String key : h.keySet() )
                {
                String value = h.get( key )
                System.out.println( "KEY : " + key + " VALUE : " + value );
                }
    

    Where h is a HashMap


  • Closed Accounts Posts: 161 ✭✭nude_hamster


    quinnd6 wrote:
    Im using a jsp to get a value from a hashmap.

    The problem is the value it's getting is 3 times what it should be.

    What could cause that?


    Ya a bit of code might help, right down and dandy :)


Advertisement