gs-securing-web
gs-securing-web copied to clipboard
Circular view path error while accessing a URL of unsecured web application
I am working through this guide and as suggested in the guide I built a simple unsecured web application first using Spring Boot 2.0.1.RELEASE version. However, I am getting the following error on trying to access a URL (http://localhost:9191/hello) of the web application:
2018-05-04 09:58:07.742 ERROR 25968 --- [nio-9191-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Circular view path [hello]: would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)] with root cause
javax.servlet.ServletException: Circular view path [hello]: would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
I replicated the code as is from the guide and my embedded tomcat server is running on port 9191 (as port 8080 is used by some other app). Also, my laptop is running Windows 7 32-bit OS and Oracle Java 8.
Am I missing something? Please suggest. Thanks in advance.
I solved it by adding the dependency of Thymeleaf in pom.xml. To perform server-side rendering of the HTML, Thymeleaf is used in this case.
I solved it by adding the dependency of Thymeleaf in pom.xml. To perform server-side rendering of the HTML, Thymeleaf is used in this case.
This solved my problem with Intellij Idea Spring Java. Thank you @williamlinl .
This can be caused by missing this line in the tutorial: https://github.com/spring-guides/gs-securing-web/blob/master/initial/pom.xml#L19
Is that what happened with folks here? If so, I'll close this ticket. But if not, how would you recommend the guide be changed to avoid this issue?
Fixed in subsequent commits.