• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting path info

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
Thanks

[This message has been edited by Mahesh Menon (edited July 16, 2001).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic