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

Not able to find a File in servlet

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using WSAD...I have an application...When i run it as a standalone application...in one of the classes..a xyz file is read ...and the execution completes successfully...

But when the same program is changed to a servlet....and i call the same intermediate class...that reads the xyz file..it says file cannot be found...

Wonder why??? I have even added the file to manifest.mf file....


Regards
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Servlets forum.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you reading the file? Can you post the code?
[ June 13, 2007: Message edited by: Jaikiran Pai ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using an absolute path to find the file on the server?

If not, post the code that locates the file.
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its not a absolute path...but a relative path
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since in a servlet there is no concept of a current directory, what are you expecting the path to be relative to?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, if you're not using an absolute path, you'll need to post the code that you're using to locate the file.

If you won't or can't do that and you can't describe exactly how you're trying to locate your file using a relative path, nobody here will be able to help you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic