Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Real File Path in eclipse

 
Sudhanshu Mishra
Ranch Hand
Posts: 238
1
Eclipse IDE Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I want to save an image in my WebContent/images folder in the dyanamic web project I am working on.
Problem is, in a JSP when I use


what I get is "D:\Eclipse\ScriptPerfect\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ScriptPerfect\WebContent\images ".

Still the image doesn't show in the WebContent directory.

I want it to be simply "D:\Eclipse\ScriptPerfect\Webcontent\images"....

Please correct me if I am wrong and help me out.

Thanks......
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you really don't want that. You really want the first path - that reflects where your wep app is running. Thus your web app was deployed to D:\Eclipse\ScriptPerfect\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ScriptPerfect\WebContent, so you want the code to look within that directory (or a subdirectory) for all contents.

Did you look in D:\Eclipse\ScriptPerfect\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ScriptPerfect\WebContent\images to see if the image you want is there? Eclipse should have copied it (and the rest of the web contents) from D:\Eclipse\ScriptPerfect\WebContent (assuming that your workspace is d:\Eclipse and that your project's name is ScriptPerfect).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic