aspose file tools*
The moose likes JSF and the fly likes FileNotFoundException with relative path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "FileNotFoundException with relative path" Watch "FileNotFoundException with relative path" New topic
Author

FileNotFoundException with relative path

Dhannya Zacharia
Greenhorn

Joined: Aug 13, 2007
Posts: 12
Hi,

I am having an action class and inside my action class i want to refer to an html file in the following directory : webContent/templates/check.html.

I am able to access this file if i specify absolute path, but when i give relative path, it gives a FileNotFoundException.

How do i solve this?

Thanks...
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

I was able to do this through the ServletContext



Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Dhannya Zacharia
Greenhorn

Joined: Aug 13, 2007
Posts: 12
Thanks Mark
 
 
subject: FileNotFoundException with relative path
 
Similar Threads
File IO and Jar file
passing file over a wire
FileNotFoundException on specifying the relative path.
Relative Path Problem
net.sf.jasperreports.engine.JRException: java.io.FileNotFoundException