I'm going to get it right now.
I make a xml file "download.xml" at 
apache-tomcat-8.0.15\conf\Catalina\localhost,the contents are as follows:


<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="F:\nas" />



And,open the tomcat web.xml listings to true.
This is done.Now I can access F:\nas by http://localhost:8080/download/


But there are still problems.Why the independent context file's name must be 
the path name?And why I set "Context path='xxx'",the path never work?


Sincerely look forward to someone who can answer me .




------------------ Original ------------------
From:  "Fung";<forever_f...@qq.com>;
Date:  Mon, Sep 5, 2016 08:48 PM
To:  "users"<users@tomcat.apache.org>; 

Subject:  How to set up a separate configuration for a Tomcat application



Hi!


I want to map a virtual path in my web app to a physical path on the server.
I know it can cross by set up the server.xml(add a <Context> tag) and open the 
web.xml "DefaultServlet" init param -- listings to true.But it will influence 
other app in the tomcat.
So,it there any ways to seperate the configuration file,preferably independent 
configuration files for each app in the tomcat.


Except someone to reply.


--Fung

Reply via email to