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 Spring Basics Modeling, Storing, and Presenting Data Create an Index Page That Presents a List of Data

Nelson Fleig
Nelson Fleig
23,674 Points

Do you need to use the @ to generate a URL? Without it seems to work fine too.

Here is the code for the anchor tag on the home page:

<a th:href="'gif/' + ${gif.name}">

It still works. Why would I use one method over the other?

1 Answer

Sławomir Lasik
Sławomir Lasik
7,792 Points

the @{} calculates the URL according to this


So I may assume that acctually this will work (both yours and teachers solution) locally but on production with different domain not.

I think...