A map<string,object> is stored in the action in the session, and a jump to a.jsp,a.jsp is submitted to baction,baction via form to obtain the map value from the session.
But since the session is stored in Tomcat's memcached, storing large objects can affect the user's use, and if you put the map in request and pass through hidden, there is a problem passing the map between the pages.
So the idea of a solution is to convert the map to JSON, store it in the request, write hidden in a.jsp, and finally get the JSON in baction, and switch to map.
Map is converted to JSON in the following way:
Jsonobject jsonobject = Jsonobject.frommap (Productmap);
Or
Jsonobject jsonobject = Jsonobject.fromobject (Productmap);
The way JSON is converted to map is:
String json = Request.getprarameter ("Product");//Get JSON string from hidden
Objectmapper mapper = new Objectmapper (); map<string,object> Productmap = Mapper.readvalue (JSON);//Turn into map
Conversion between map and JSON