• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FileNotFoundException

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi pals

I have on application. in this application we are usig Maven and androMDA. O.K. in this application i have written one jsp page. the jsp page reading one file. the file reside same directory. after building the application, i opend console page. iam trying to get file results, there iam getting above exception...

where i have to put the file ?
in the same directory or any another?
my source code is resides in d:\malli\console\.....
my .ear file resides in d:\malli\jboss-4.0.0\server\deploy\..

where ia have to put my file?

Thanks
Mallikarjuna
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I bet you are using a method to open the file that depends on the "current directory" - in the JSP environment you have NO control over the current directory - there are specific methods to find files relative to the location of a web application. See for example getRealPath() and related methods in ServletContext class.

You can probably find recent discussions in the JSP and servlet forums.

Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic