Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

FilenotFoundException is thrown when tomcat is loaded  RSS feed

 
Sanjay JaiDeep
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an web.xml file which loads a class file on startup. But when ever i start the the server, the FileNotFound exception is thrown.

The code for the class file is as below :


This class file is loaded on startup.

The config file "al_con" is in the correct path. but it always throws FileNotFoundException


please help me in this

regards
sanjay
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The config file "al_con" is in the correct path.


Maybe not. Within a web application there is no notion of a default directory. You should use an absolute path, or use ServletContext.getRealPath to convert a virtual path to a physical path.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!