推荐部署网站

 推荐部署

    http://localhost:8080 à Tomcat Document à Referer à Configuation à Context

    For Tomcat 6, unlike Tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file.

    In individual files (with a ".xml" extension) in the

$CATALINA_BASE/conf/[enginename]/[hostname]/ directory. The name of the file (less the .xml extension) will be used as the context path. Multi-level context paths may be defined using #, e.g. foo#bar.xml for a context path of /foo/bar. The default web application may be defined by using a file called ROOT.xml.

    如果要配置一个网站,但是该网站在其他的磁盘中,那么可以创建一个后缀为.xml的文件。文件的名字将被用作访问网站的路径即path属性值。如果需要访问的时候路径多级的那么需要将文件名以#进行基本的名字的分隔。/a/b那么文件名必须是2#b.xml。如果需要自己的网站是默认的网站那么需要将文件名定义为ROOT.xml。如果网站需要为默认网站,那么必须要重启服务器。

    %tomcat_home%\conf\Catalina\localhost

    myitcast.xml   <Context docBase="c:\jnb"/>

    http://localhost:8080/myitcast

posted on 2014-05-14 13:48  wf110  阅读(255)  评论(0编辑  收藏  举报