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).]
Yup, yup, yup. Tiny ad:
Why should you try IntelliJ IDEA ?

This thread has been viewed 559 times.

All times above are in ranch (not your local) time.
The current ranch time is
Aug 15, 2018 07:44:02.