In my web application, I create new Hashmap and save it in session in first Servlet and use it in the next servlet. In the next servlet i am performing some java script function on the map values and hence updating the map and putting again the updated map in the session . Finally i am displaying the new values in the jsp and submit which will update the new values in the server and thank you page will come.
Note here : It is a user based application, so every user will login and a new hasmap is getting created and storing values specific to the user. Than i am putting that in session which will be used further in application.I am using session.setattribute("map",mapobject) and session.getattribute("map").
So my questions are :
Does this map need to be synchronized ? Please not that i am creating a new object of HashMap when user logged In.
Does the session approach looks good ? I am setting map in session.setAttribute("map",mapobject) ...so if multiple user logged in at the same time will this work for them and store there specific values in the session "map" or it will do some conflict with other user sessions.