• 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

Accessing files outside Tomcat

 
sanitation engineer
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible for a web app to read files that are stored on a directory outside of the web server? These files need to be viewed over http. If so, what should I be using? I figure that there should be some type of mapping between the app and the directory.

Thanks,
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Carlisia,
You will need to put a context for your directory in your server.xml

something similar to:

<Context path="/mydirectory" docBase="/mydirectory" debug="0"
reloadable="true" privileged="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="mydirectory_log" suffix=".txt"
timestamp="true"/>
</Context>

apply it at the host level.

If you use apache front end you'll need to add some stuff in the httpd.conf file also.

hope this helps.
Robyne
reply
    Bookmark Topic Watch Topic
  • New Topic