Undefined attribute name (sec:authentication)
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
add a comment |
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
add a comment |
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
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
spring-security thymeleaf
asked Feb 8 '16 at 11:37
Ruelos Joel
650521
650521
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
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">
add a comment |
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>
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 yourhome.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
add a comment |
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"
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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">
add a comment |
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">
add a comment |
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">
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">
answered Feb 11 '16 at 9:27
Ruelos Joel
650521
650521
add a comment |
add a comment |
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>
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 yourhome.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
add a comment |
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>
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 yourhome.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
add a comment |
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>
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>
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 yourhome.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
add a comment |
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 yourhome.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
add a comment |
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"
add a comment |
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"
add a comment |
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"
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"
answered Nov 20 at 4:46
RAJESH KUMAR ARUMUGAM
1,0141025
1,0141025
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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