I'm trying to share an hashmap(or any other stuff to share data) between a java class and a servlet.
The hashmap has to be filled into the servlet with some data and then I have to get those data from the java class.
What is the best approach?
I cannot use a DTO because I have several concurrent requests to my servlet.
Thanks for your help.
What in the are you trying to say? What does "filled into the servlet mean?" Is the map somewhere outside the servlet? In a different process? Are you asking how to extract data from a map? Something else?
Sorry, but your question makes no sense.