Friday, February 1, 2008

Tomcat 5.5 Virtual Directory

Lots of people stumbled here from Google looking for how to create virtual directory in Tomcat 5.5. Since I've deleted the post, I'll write it here:

Suppose you want to create a virtual directory named resource that’s mapped to a folder outside web application folder, e.g. to E:\Internet-Server\tomcat\resources. Virtual Directory on Tomcat 5.5 can be implemented by following these steps:

  • Open [Tomcat_Installation_Directory]\conf\Catalina\localhost (this can be different with yourse, depend on how you configure your server)

  • Create an XML file named resources.xml with the following content:
    <Context path=”/resources” docBase=”E:/Internet-Server/tomcat/resources” debug=”0″ privileged=”true”>
    </Context>


Restart Tomcat, and you’re done.

1 comment:

  1. [...] post by Gandhi Manalu’s Hiding Place Share and Enjoy: These icons link to social bookmarking sites where readers can share and [...]

    ReplyDelete