How to create a virtual directory inside Apache Tomcat

To employ Apache Tomcat instead of IIS to play the preview of assets in eMAM, we need to make necessary changes in configurations in two locations as explained below.

1. Adding Virtual directory
  1. Open C:\Program Files\Empress Media\eMAM Ingest Manager\eMAMUploadManager\conf\server.xml with a text editor
  2. Add <Context docBase="[path]" reloadable="true" debug="0" path="[name of virtual directory]"/> inside inside <Host></Host> tag
eg: <Context docBase="\\10.0.8.12\emamfolders\" reloadable="true" debug="0" path="/emamfolders/"/>

  1. Save the file
 
2. Enabling CORS
 
  1. Open C:\Program Files\Empress Media\eMAM Ingest Manager\eMAMUploadManager\conf\ web.xml with a text editor
  2. Add the below code
<filter>
 <filter-name>CorsFilter</filter-name>
 <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
 <init-param>
 <param-name>cors.allowed.origins</param-name>
 <param-value>*</param-value>
 </init-param>
 </filter>
 <filter-mapping>
 <filter-name>CorsFilter</filter-name>
 <url-pattern>/*</url-pattern>
 </filter-mapping>
  1. Save the file
Use the newly created virtual directory for the Storage Configuration in the Superadmin console.