• Post Reply Bookmark Topic Watch Topic
  • New Topic

FileNotFoundException  RSS feed

 
thippareddy mallikarjuna reddy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!