Forums Register Login
Getting path info
Hi there .
I have a situation where I need to run a batch file from jsp page. This can be done by using response.sendRedirect
"file: //request.getServerName() +request. getRealPath("batchfolder/")+batchfilename);
The 'request.getRealPath("batchfolder/")' will give me the location of batchfolder from the server . For example if the application name is projectA it gives me the info as "/projectA/batchfolder" . this will build up the string as file://servername / projectA/batchfolder/batchfilename.bat
and does the task well.
Now the issue is when I have my project as a link . Like say projecta --> ../tFolder/ projectA . I am not getting the path correctly. If I use the same way its giving me the path as file://servername/tFolder/projectA/batchfolder/batchfilename.bat , which I don't want. Is there any work around for this. I need the path as file://servername/projectA/batchfolder/batchfilename.bat only.

[This message has been edited by Mahesh Menon (edited July 16, 2001).]
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

All times above are in ranch (not your local) time.
The current ranch time is
Oct 22, 2017 23:07:45.