• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Url resolving in when passing image to ModelAttribute  RSS feed

 
Master Rancher
Posts: 1070
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I have a springBoot app with MVC architecture In which I upload a file, that part works, it gets uploaded to the expected folder, but I can't seem to pass it on afterwords to the model.
so it's being uploaded to webapp/img/uploads
I've tried to use, the relativepath starting from the page, I tried to use ${pageContext.request.contextPath}/img/uploads/fileName.extention and I tried the full path, which can't be what it's suposed to be, but just trying everything, nothing seems to work.
On my home page I succeeded in passing the url and display the image by using the relative path. Anyone know how to resolve this?
 
Daniel Demesmaecker
Master Rancher
Posts: 1070
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, I managed to fix the issue
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!