Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

servlet API

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm working on an intranet site project.I've to write a servlet to store some temp files on the machine.
For that i need to get the temp folder location at run time. I want to use relative path for that.

So lets say for my sandbox setup, the application is deployed on tomcat in the location:

C:/projects/server/apache-tomcat-5.5.23/webapps/fstkservices/

and i want to save the temp files in a folder tempupload under fstkservices. So my question is that how do i get the above location in my servlet code. Is there any API to get the root location of where the application is deployed?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please do not crosspost the same question in different forums. Thank you.
Refer to your original thread here :
https://coderanch.com/t/364492/Servlets/java/context-root
 
Ishita Saha
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm sorry for that, just wanted to have an early reply. thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic