• Post Reply Bookmark Topic Watch Topic
  • New Topic

Relative path issue with ubuntu

 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I am developing an application in Spring and want to display the image of the employee, which was uploaded by him. The problem is when i use the below tag in my jsp page



under Windows its working correctly, but when i use the same in Ubuntu, the path gets displayed but the image is not loading.
Since our development environment in ubuntu, i am totally confused by this. I am using Windows based PC only to test this piece of code.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From within a web app it shouldn't matter what OS you're using.
See:
http://faq.javaranch.com/java/RelativeLinks
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben Souther wrote:From within a web app it shouldn't matter what OS you're using.
See:
http://faq.javaranch.com/java/RelativeLinks


Yes it is, but the program works with Windows, while in Ubuntu it's not. I didn't even get a clue on whats wrong. No matter what, even i gave the absolute path, the images aren't loaded, even my JS files are not loaded.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you show us how you're building these links?
It would also be helpful if you could show us the end result by using your browser's "View Source" option to get the exact string that is being sent to the client.
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am uploading a image and store it under WEB-INF/images/ folder. Getting the destination directory path and store it as two, like relative path and absolute path.

so the fpath is simply like this "/images/{filename}.{extension}" -> This is what i see when i view the code using "view source"

the absolute path is "/home/user/workspace/Erp/WebContent/images/{filename}.{extension}"

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!