Undefined attribute name (sec:authentication)












1














I'm using Thymleaf in my spring security simple POC. Below is my sample code in home.html file.



Hello <span sec:authentication="name">User</span>!i


How to get rid of the html warning



Undefined attribute name (sec:authentication).









share|improve this question



























    1














    I'm using Thymleaf in my spring security simple POC. Below is my sample code in home.html file.



    Hello <span sec:authentication="name">User</span>!i


    How to get rid of the html warning



    Undefined attribute name (sec:authentication).









    share|improve this question

























      1












      1








      1







      I'm using Thymleaf in my spring security simple POC. Below is my sample code in home.html file.



      Hello <span sec:authentication="name">User</span>!i


      How to get rid of the html warning



      Undefined attribute name (sec:authentication).









      share|improve this question













      I'm using Thymleaf in my spring security simple POC. Below is my sample code in home.html file.



      Hello <span sec:authentication="name">User</span>!i


      How to get rid of the html warning



      Undefined attribute name (sec:authentication).






      spring-security thymeleaf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 8 '16 at 11:37









      Ruelos Joel

      650521




      650521
























          3 Answers
          3






          active

          oldest

          votes


















          7














          I Just duplicate the namespace for sec tag and html warning disappear



          <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:th="http://www.thymeleaf.org"
          xmlns:sec="http://www.thymeleaf.org">





          share|improve this answer





























            0














            1) Add this dependency to pom.xml:



            <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-springsecurity3</artifactId>
            <version>3.0.0.BETA01</version>
            </dependency>


            2) Add additional dialect to templateEngine bean:



            <!-- Thymeleaf Template Engine (Spring4-specific version) -->
            <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
            <property name="templateResolvers">
            <set>
            <ref bean="templateResolver" />
            </set>
            </property>
            <property name="additionalDialects">
            <set>
            <bean class="org.thymeleaf.extras.springsecurity3.dialect.SpringSecurityDialect" />
            </set>
            </property>
            </bean>





            share|improve this answer























            • I've added these libraries and configuration. I think this is not the solution for the issue.
              – Ruelos Joel
              Feb 9 '16 at 2:21










            • Show full code of your home.html
              – Roman Cherepanov
              Feb 9 '16 at 7:36










            • @fuzzy28 did you look at this question: stackoverflow.com/questions/18309864/… ?
              – Roman Cherepanov
              Feb 9 '16 at 10:00



















            0














            Joel's answer works well But this is the Proper Name Space Suggested in the Official Guidelines




            xmlns:sec="http://www.thymeleaf.org/extras/spring-security"







            share|improve this answer





















              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35268736%2fundefined-attribute-name-secauthentication%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              7














              I Just duplicate the namespace for sec tag and html warning disappear



              <html xmlns="http://www.w3.org/1999/xhtml"
              xmlns:th="http://www.thymeleaf.org"
              xmlns:sec="http://www.thymeleaf.org">





              share|improve this answer


























                7














                I Just duplicate the namespace for sec tag and html warning disappear



                <html xmlns="http://www.w3.org/1999/xhtml"
                xmlns:th="http://www.thymeleaf.org"
                xmlns:sec="http://www.thymeleaf.org">





                share|improve this answer
























                  7












                  7








                  7






                  I Just duplicate the namespace for sec tag and html warning disappear



                  <html xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:th="http://www.thymeleaf.org"
                  xmlns:sec="http://www.thymeleaf.org">





                  share|improve this answer












                  I Just duplicate the namespace for sec tag and html warning disappear



                  <html xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:th="http://www.thymeleaf.org"
                  xmlns:sec="http://www.thymeleaf.org">






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 11 '16 at 9:27









                  Ruelos Joel

                  650521




                  650521

























                      0














                      1) Add this dependency to pom.xml:



                      <dependency>
                      <groupId>org.thymeleaf.extras</groupId>
                      <artifactId>thymeleaf-extras-springsecurity3</artifactId>
                      <version>3.0.0.BETA01</version>
                      </dependency>


                      2) Add additional dialect to templateEngine bean:



                      <!-- Thymeleaf Template Engine (Spring4-specific version) -->
                      <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
                      <property name="templateResolvers">
                      <set>
                      <ref bean="templateResolver" />
                      </set>
                      </property>
                      <property name="additionalDialects">
                      <set>
                      <bean class="org.thymeleaf.extras.springsecurity3.dialect.SpringSecurityDialect" />
                      </set>
                      </property>
                      </bean>





                      share|improve this answer























                      • I've added these libraries and configuration. I think this is not the solution for the issue.
                        – Ruelos Joel
                        Feb 9 '16 at 2:21










                      • Show full code of your home.html
                        – Roman Cherepanov
                        Feb 9 '16 at 7:36










                      • @fuzzy28 did you look at this question: stackoverflow.com/questions/18309864/… ?
                        – Roman Cherepanov
                        Feb 9 '16 at 10:00
















                      0














                      1) Add this dependency to pom.xml:



                      <dependency>
                      <groupId>org.thymeleaf.extras</groupId>
                      <artifactId>thymeleaf-extras-springsecurity3</artifactId>
                      <version>3.0.0.BETA01</version>
                      </dependency>


                      2) Add additional dialect to templateEngine bean:



                      <!-- Thymeleaf Template Engine (Spring4-specific version) -->
                      <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
                      <property name="templateResolvers">
                      <set>
                      <ref bean="templateResolver" />
                      </set>
                      </property>
                      <property name="additionalDialects">
                      <set>
                      <bean class="org.thymeleaf.extras.springsecurity3.dialect.SpringSecurityDialect" />
                      </set>
                      </property>
                      </bean>





                      share|improve this answer























                      • I've added these libraries and configuration. I think this is not the solution for the issue.
                        – Ruelos Joel
                        Feb 9 '16 at 2:21










                      • Show full code of your home.html
                        – Roman Cherepanov
                        Feb 9 '16 at 7:36










                      • @fuzzy28 did you look at this question: stackoverflow.com/questions/18309864/… ?
                        – Roman Cherepanov
                        Feb 9 '16 at 10:00














                      0












                      0








                      0






                      1) Add this dependency to pom.xml:



                      <dependency>
                      <groupId>org.thymeleaf.extras</groupId>
                      <artifactId>thymeleaf-extras-springsecurity3</artifactId>
                      <version>3.0.0.BETA01</version>
                      </dependency>


                      2) Add additional dialect to templateEngine bean:



                      <!-- Thymeleaf Template Engine (Spring4-specific version) -->
                      <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
                      <property name="templateResolvers">
                      <set>
                      <ref bean="templateResolver" />
                      </set>
                      </property>
                      <property name="additionalDialects">
                      <set>
                      <bean class="org.thymeleaf.extras.springsecurity3.dialect.SpringSecurityDialect" />
                      </set>
                      </property>
                      </bean>





                      share|improve this answer














                      1) Add this dependency to pom.xml:



                      <dependency>
                      <groupId>org.thymeleaf.extras</groupId>
                      <artifactId>thymeleaf-extras-springsecurity3</artifactId>
                      <version>3.0.0.BETA01</version>
                      </dependency>


                      2) Add additional dialect to templateEngine bean:



                      <!-- Thymeleaf Template Engine (Spring4-specific version) -->
                      <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
                      <property name="templateResolvers">
                      <set>
                      <ref bean="templateResolver" />
                      </set>
                      </property>
                      <property name="additionalDialects">
                      <set>
                      <bean class="org.thymeleaf.extras.springsecurity3.dialect.SpringSecurityDialect" />
                      </set>
                      </property>
                      </bean>






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Apr 13 '17 at 17:49

























                      answered Feb 8 '16 at 22:02









                      Roman Cherepanov

                      8141830




                      8141830












                      • I've added these libraries and configuration. I think this is not the solution for the issue.
                        – Ruelos Joel
                        Feb 9 '16 at 2:21










                      • Show full code of your home.html
                        – Roman Cherepanov
                        Feb 9 '16 at 7:36










                      • @fuzzy28 did you look at this question: stackoverflow.com/questions/18309864/… ?
                        – Roman Cherepanov
                        Feb 9 '16 at 10:00


















                      • I've added these libraries and configuration. I think this is not the solution for the issue.
                        – Ruelos Joel
                        Feb 9 '16 at 2:21










                      • Show full code of your home.html
                        – Roman Cherepanov
                        Feb 9 '16 at 7:36










                      • @fuzzy28 did you look at this question: stackoverflow.com/questions/18309864/… ?
                        – Roman Cherepanov
                        Feb 9 '16 at 10:00
















                      I've added these libraries and configuration. I think this is not the solution for the issue.
                      – Ruelos Joel
                      Feb 9 '16 at 2:21




                      I've added these libraries and configuration. I think this is not the solution for the issue.
                      – Ruelos Joel
                      Feb 9 '16 at 2:21












                      Show full code of your home.html
                      – Roman Cherepanov
                      Feb 9 '16 at 7:36




                      Show full code of your home.html
                      – Roman Cherepanov
                      Feb 9 '16 at 7:36












                      @fuzzy28 did you look at this question: stackoverflow.com/questions/18309864/… ?
                      – Roman Cherepanov
                      Feb 9 '16 at 10:00




                      @fuzzy28 did you look at this question: stackoverflow.com/questions/18309864/… ?
                      – Roman Cherepanov
                      Feb 9 '16 at 10:00











                      0














                      Joel's answer works well But this is the Proper Name Space Suggested in the Official Guidelines




                      xmlns:sec="http://www.thymeleaf.org/extras/spring-security"







                      share|improve this answer


























                        0














                        Joel's answer works well But this is the Proper Name Space Suggested in the Official Guidelines




                        xmlns:sec="http://www.thymeleaf.org/extras/spring-security"







                        share|improve this answer
























                          0












                          0








                          0






                          Joel's answer works well But this is the Proper Name Space Suggested in the Official Guidelines




                          xmlns:sec="http://www.thymeleaf.org/extras/spring-security"







                          share|improve this answer












                          Joel's answer works well But this is the Proper Name Space Suggested in the Official Guidelines




                          xmlns:sec="http://www.thymeleaf.org/extras/spring-security"








                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 20 at 4:46









                          RAJESH KUMAR ARUMUGAM

                          1,0141025




                          1,0141025






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35268736%2fundefined-attribute-name-secauthentication%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                              Alcedinidae

                              Can an atomic nucleus contain both particles and antiparticles? [duplicate]