Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting path info

Mahesh Menon
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic