how to use javascript map variable in servlet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santaji
    New Member
    • Jul 2009
    • 7

    how to use javascript map variable in servlet

    I want to keep mapping of some key value pairs in javascript for that i m using a map inside javascript and want to access this map at server side in servlet where I don't know the key and value so I want to know is there anything can be done to access this var in servlet like java map where i can get both keys and corresponding values also.

    Code:
    var output={}
    
    output[id1] = value1;
    output[id2] = value2;
    output[id3] = value3;
    how can I access these stored values inside servlet?
    Last edited by gits; Mar 15 '10, 08:34 AM. Reason: added code tags
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you would need to transfer that to the server with an ajax-call or whatever request ... just create a json-string from it or xml or plain text or what you prefer and add it to a request that your servlet could handle ...

    kind regards

    Comment

    Working...