intellij thymeleaf Namespace th is not bound

Purzynski picture Purzynski · Sep 3, 2015 · Viewed 16.3k times · Source

I am using IntelliJ IDEA and I have with thymeleaf namespaces. I have created employee form which I am including into others templates so I did not specified namespaces but its works fine when I run my application. Is there any way to change this behaviour. I like auto-complete function :-)

Namespace 'th' is not bound example:

Namespace 'th' is not bound

Answer

Grigory Kislin picture Grigory Kislin · Feb 8, 2016

Also, if you are using Spring you should use the following:

<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
  <head>
     <title>Hello</title>
  </head>
  <body>
  </body>
</html>

The difference is in the DOCTYPE. See Intellij Idea: Thymeleaf namespace unkown