I have a simple html page, "index.html". I'm testing server.servlet.context-path=/test and i'm testing on the webpage the redirection on itself, nothing more. For some reason that I can't understand, even with the docs about thymeleaf https://www.thymeleaf.org/doc/articles/standardurlsyntax.html
<a th:href="@{/index.html}">Reload page</a>
It's just displaying "Reload page" and I can't even click on it. My goal is to be able to click on it and to be redirected to /test/index.html, as I thought this would be the accurate method.
Feel free to give me any advice on how to do so, or why isn't it working the way it's supposed to be.
Thanks you very much for your time !
EDIT : Here are the dependencies thymeleaf-related I'm using :
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!DOCTYPE html> <html xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head>
<title>Test page</title>
</head>
<body>
<a th:href=@{/index.html}>Reload page</a>
</body>
</html>
This is the exact page I'm using. If I remove the xmlns in the html tag, the th:ref is marked as "Undefined attribute name (th:href)." Which made me think that when I have the xmlns (as it is right now) the attribute is correctly defined.