creating file object using relative path as parameter

I am working on JSP

I want to create a file object by passing a relative path as parameter to

File f = new File("<relative path>");

i encounter the following error

"it says server cannot find the file in the path specified."

I have searched the forums but not able to get any relevant expalination.

Its an urgent requirement. So please reply. Thanks in advance.

[414 byte] By [sragvia] at [2007-11-26 23:59:05]
# 1
got the solution for that.ServletContext servletContext = getServletContext();String filename = servletContext.getRealPath("<realative path>");
sragvia at 2007-7-11 15:47:38 > top of Java-index,Core,Core APIs...