Help - Tomcat virtual dir mapping

J

java9394

I have a shared doc dir, /usr/local/shared/docs (pdf, word, excel,
txt, html, etc)

I want to map this dir to my webapp, ie. //mysite.com/myapp/docs

1) I can't move this docs under myapp becuase it is shared among
different apps.

2) If I move this docs to myapp, the contents will be deleted
everytime when I re-deploy myapp.


so, is there a way to map this external dir? or is there a servlet
can handle the redirection and MIME issue?

many thanks.

java9394
 
B

Bryce

I have a shared doc dir, /usr/local/shared/docs (pdf, word, excel,
txt, html, etc)

Since you are using Linux or Unix... try mount.

mount --bind /usr/local/shared/docs <webappdir>/<whatever folder you
want to mount to>

for persistence, it can go into your fstab as such:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top