Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Spring Basics Modeling, Storing, and Presenting Data Create an Index Page That Presents a List of Data

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...