Virtual Directory Listing WebApp Sample Guide

INTRODUCTION

This sample is to demonstrate how to do vistual directory listing using a tomcat webapp. In other words contents of a external directory anc be mapped and shown in the webapp UI. This sample has functionality of both listing and downloading the given directory content.

CONFIGURING VIRTUAL DIRECTORY MAPPING

Define the virtual directory mapping:

Open the virtualwebapp/WEB-INF/web.xml and modify the following parameter and replace the path with the absolute directory path you want to map.

                <param-value>/path/to/virtual/directory/to/be/mapped/</param-value>
            

BUILDING SAMPLE

  1. Start the WSO2AppServer server
  2. Switch to the VirtualDirectoryListing sample directory
  3. e.g. In MS Windows cd CARBON_HOME\samples\VirtualDirectoryListing or in
    	    Linux cd CARBON_HOME/samples/VirtualDirectoryListing
  4. Type ant and press enter
  5. e.g. CARBON_HOME\samples\VirtualDirectoryListing>ant or
                    CARBON_HOME/samples/VirtualDirectoryListing$ ant
  6. This will copy the sample webapp (virtual.war file) in the "build" directory to the "CARBON_HOME/repository/deployment/server/webapps/" directory. If you start AppServer if its not already started, will be available as a deployed webapp under "Manage> Web Applications> List".