${tags}
invokes the toString()
method of ArrayList
. Instead, you need to prepare a comma-separated string. You can do that in the contoroller or in the view.
In the controller you can use a json mapper (e.g. jackson):
ObjectMapper mapper = new ObjectMapper(); // this better be a field
String tags = mapper.writeValueAsString(getAllTags());
model.addAttribute("tags", tags);