Techiio-author
Started by Natasha JonesSep 23, 2021

Open
How can I pull a URL from my mysql database and pass it into a thymeleaf template as an img src?

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I am building an application with Hibernate and Thymeleaf. I have an object for Image urls so the user can put in the url and it gets pulled from the database and put into the template as th:src

The problem I am ending up with is instead of it pulling the url from the database it is trying to use it as a local directory or something. The links in my db include http:// or https:// which I've seen referenced as a problem in other questions asked.

http://localhost:8080/com.liftoff.thymeleafrecipeproject.demo.models.Image@24

This is what I am getting as the Image url, what am I doing wrong here?

0 Replies

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance