Hi Maulin & Jason,
I tried maulin way & it does recognize the mapped drive.
But somehow its not working in my servlet code.
YES my server has a mapped drive and I am checking, from within the servlet, whether or not a directory in that mapped drive is a directory or not?
Part of my Servlet code is as follows
****************************************************
public MultipartRequest(HttpServletRequest request,
String saveDirectory,
int maxPostSize,
String encoding,
FileRenamePolicy policy) throws IOException {
// Sanity check values
if (request == null)
throw new IllegalArgumentException("request cannot be null");
if (saveDirectory == null)
throw new IllegalArgumentException("saveDirectory cannot be null");
if (maxPostSize <= 0) {
throw new IllegalArgumentException("maxPostSize must be positive");
}
// Save the dir
File dir = new File(saveDirectory);
// Check saveDirectory is truly a directory
if (!dir.isDirectory())
throw new IllegalArgumentException("Not a directory: " + saveDirectory);
******************************************************************
Well
My mapped folder is like this
websites$on Kard(G
(It means I have folder mapped to G: rather than disk drive)
Where Kard is the machine name & websites is a folder or directory on the machine so actual path is \\kard\d:\websites
Now My question is can I access this folder without using mapped drive letter like this \\kard\d&\websites
I would really appreciate if u can help me.
Thanks for your previous replies
Madhuri