How to Add a Servlet Mapping for Your SiteID to Tomcat
When deploying Mura with Tomcat you must ensure that the required web.xml
servlet mappings exist. (If you used the Mura installer, two mappings were created within the default {tomcat}/conf/web.xml for you). These mappings are available to all Mura instances running on the same instance of Tomcat.
<servlet-mapping> <servlet-name>GlobalCFMLServlet</servlet-name> <url-pattern>/index.cfm/*</url-pattern> <url-pattern>/default/index.cfm/*</url-pattern> </servlet-mapping>
If you are not using the Default site and want to include the SiteIDs in your URLs, you need to explicitly add the mapping for each SiteID:
<servlet-mapping> <servlet-name>GlobalCFMLServlet</servlet-name> <url-pattern>/default/index.cfm/*</url-pattern> <url-pattern>/someSiteID/index.cfm/*</url-pattern> <url-pattern>/anotherSiteID/index.cfm/*</url-pattern> </servlet-mapping>
In addition, since any changes to the {tomcat}/conf/web.xml
are global for that Tomcat instance you may want to add your custom SiteID mappings to your site's local WEB-INF/web.xml
instead (recommended). That way your custom mapping will only be available for the your current web context.
It is also very important to note that any changes to your web.xml
files will not take effect until you restart Tomcat. You may also have to clear your browser's cache in order to see the changes take effect.
Finally, be sure to follow the instructions found in the htaccess.txt
included at the root of your Mura installation for additional configuration requirements. To use the sample htaccess.txt file, simply copy the file and rename it .htaccess
(note the period at the beginning).