Hi,
My directory structure for my web application is like following
—Web
|
|—-photos
| |
| +-abc
| +-pqr
|
|—pages
| |–home.jsp
|
|—WEB-INF
|
|-+-classes
|
|—src
|
|—com
|
|—webapp
|
|–HomePageAction.java
Now what I want to do is I have got one Action Servlet from there I want to find out how many directories in web/photos directory.
Now my first que is when i am using this syntax
File f1 = new File(path);
so what shud be the path, shud it be path = “../../photos”;
but here it cannot find any files. when I am taking the path as path=”../”; then it gives me some files which is not even any directory.
So I am not sure it is the right way to access the files from web application or servlet. or weather I am taking the wrong path.
Pls reply me the solution as I am stuck here and dont know what to do.
Thanks
Krunal Shah