| Author |
Directory Creation
|
Arpit Gadle
Ranch Hand
Joined: Dec 16, 2008
Posts: 69
|
|
Dear All,
I want to create a directory(in tomcat) inside my current webapplication i.e DemoDirApp. This is the code of the servlet. This servlet code creates the directory in C:\ where the tomcat is installed
Need your help
Regards
Arpit U. Gadle
|
 |
Sebastian Janisch
Ranch Hand
Joined: Feb 23, 2009
Posts: 1183
|
|
|
Uhm, what exactly is your problem ? Do exceptions occus ?
|
JDBCSupport - An easy to use, light-weight JDBC framework -
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12266
|
|
If you expected that directory to be relative to your application, you have the wrong idea.
The class java.io.File deals with operating system directories, to get the translation from application relative to operating system, look into the ServletContext getRealPath() documentation.
Bill
|
Java Resources at www.wbrogden.com
|
 |
Arpit Gadle
Ranch Hand
Joined: Dec 16, 2008
Posts: 69
|
|
Hi,
Thanks Williams,
There is indeed know that the path which I used is wrong and thanks for giving the correct explanation. Will check with the getRealPath().
Thanks
Arpit
|
 |
 |
|
|
subject: Directory Creation
|
|
|