Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: View Profile not working/Thymeleaf/Spring

  1. #1
    Junior Member
    Join Date
    Dec 2021
    Thanked 0 Times in 0 Posts

    Default View Profile not working/Thymeleaf/Spring

    My problem is probably very simple, but I just cannot get it to work.
    I want, after a user is logged in, to be able to view their profile.
    Thymeleaf does not find the id that I pass from the controller, no matter what I do it is always underlined.
    And when I hover on the View Profile link it does not show the id at the end (localhost:8080/users/profile ).

    First I tried getting the id from the userViewModel, but I understand that it is not yet populated and will be after I click on View Profile. So I tried getting the id from the current user, but it didn't work either.

    The ModelAttribute is because after I click on View Profile (I still get this with no id at the end ) it returns 404 and I thought that it doesn't find the userViewModel. But this didn't work too.

    I hope for some advice as I am really stuck.
    Last edited by SJS; December 4th, 2021 at 02:18 AM.

Similar Threads

  1. Need help change profile
    By John Joe in forum The Cafe
    Replies: 4
    Last Post: March 31st, 2019, 12:32 PM
    By gokuball in forum Forum Updates & Feedback
    Replies: 0
    Last Post: August 11th, 2013, 08:34 PM
  3. selenium profile
    By bean in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 11th, 2013, 11:22 AM