Although it's not the best way (but you already know that), it's definitely possible to serialize and de-serialize a HashMap, as long as its contents are also serializable (which Strings are). However, you need to add some synchronization to ensure only one request can access the file at a time, or you risk your data getting inaccurate or even corrupted.
Thanks both. I also worked out that I needed to put the full path to save the .ser file, and as I am running off the localhost I had to put the path for my local drive (C:\) where my project is saved. However if this was a live web app how would I save the .ser file to the server as I tried http://localhost:8080/WebApplication1/... but this did not work?