I'm using Thymeleaf version 2.1.4 and I want to print a string when sending query parameters to the URL. But it prints a string object, like this [Ljava.lang.String;@767a8ed5
. I try to print it like this in HTML:
The URL is like this:
http://localhost:8000/about?message=This is about page.
Appreciate the error in my code and hope for help.
The Param object returns an array of strings for each parameter, even if the parameter has only one value, which is why you see the object reference
[Ljava.lang.String;@767a8ed5
. You can access the first element of the array using indexing like this: