In my Spring controller I'm redirecting to a view and adding two parameters param1 and param2. I want to make a div tag visible if param1 exists, so I check if param1 exists using Thymeleaf:
<div th:if="${param.keySet().contains('param1')}"> <p>something</p> </div>
And this will make the div visible...but if I add in the URL param2 too, it won't work anymore. Why? How do I make it work if I have multiple parameters? I want to use param2 for something else, take its value.
This is how my url looks like "/view?param1?param2=value". Do I need to separate the params differently?