Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Integrating User Data Into Our Application

sec:authorization="name" does not render username, even after principal name is set.

I have used the template engine from https://github.com/treehouse/todotoday/blob/master/src/main/java/com/teamtreehouse/todotoday/config/TemplateConfig.java.

My templates directory is a direct child of the resources directory. I checked that the Principal from the controller contains the correct username as the current logged in user's name. I used an anchor element with an attribute of sec:authorization="name", but no markup appears on the webpage. IntelliJ complained about the namespace not being bound, but I suppressed those warning as Chris suggested in the teacher's notes of https://teamtreehouse.com/library/integrating-user-data-into-our-application. Any help would be highly appreciated.

Currently I am using th:inline="text" with [[${#httpServletRequest.remoteUser}]] within the anchor element and the username is displayed properly. Please let me know what you think.