Sung
Sung
Explore posts from servers
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
<div th:if="${user != null}">
<img th:src="${user.image}" alt="Image de profil" width="400px"/>
</div>
<div th:if="${user != null}">
<img th:src="${user.image}" alt="Image de profil" width="400px"/>
</div>
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
I ask chatGPT and it says I don't need an URL if this comes from my db
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
but with the code I have in my template and how I have this image, this shouldn't be an issue to display it
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
@Peter Rader I changed my image type in my entities and DTO to bytes, people recommended me to do that
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
I have one image called jiri.jpg and that's it no other images
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
You mean from my db ?
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
also I'm trying to learn thymeleaf and I'm new to Spring Boot so maybe there's some notions I misunderstood
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
I don't know what you mean by raw bytes, but yes I typed it in string. I wasn't supposed to do it this way ?
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
persisted in my db
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
This is a simple image in jpg
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 8/6/2024 in #java-help
Thymeleaf / Loading image from DTO
@NotEmpty(message = "This field cannot be empty")
private String image;

/**
* @return String return the image
*/
public String getImage() {
return image;
}

/**
* @param image the image to set
*/
public void setImage(String image) {
this.image = image;
}
@NotEmpty(message = "This field cannot be empty")
private String image;

/**
* @return String return the image
*/
public String getImage() {
return image;
}

/**
* @param image the image to set
*/
public void setImage(String image) {
this.image = image;
}
22 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 7/29/2024 in #java-help
RequestParam / User Not Found
Wait no on this one I think you're wrong because if it wasn't encoded, I couldn't even get a status 200 from my URL as I showed you above
21 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 7/29/2024 in #java-help
RequestParam / User Not Found
Wait we need to urlencode the special characters ?
21 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 7/29/2024 in #java-help
RequestParam / User Not Found
I have it but when I click on the profile page it returns me a user not found because the param query is null
21 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 7/29/2024 in #java-help
RequestParam / User Not Found
No description
21 replies
JCHJava Community | Help. Code. Learn.
Created by Sung on 7/29/2024 in #java-help
RequestParam / User Not Found
Well actually, I didn't build anything yet in my profile page but when I write the whole URL, it returns me the name but when I click to access to the profile page it doesn't
21 replies