I am trying to use jetty context configuration ( configuration placed in $JETTY_HOME/context/ ). I am trying to configure a ContextHandler
that is responsible for serving static files as the one ine javadoc.xml
. My configuration files is goes like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.eclipse.org/configure.dtd">
<!--
Configure a custom context for serving javadoc as static resources
-->
<Configure class="org.eclipse.jetty.server.handler.ContextHandler">
<Set name="contextPath">/*/html</Set>
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/html/</Set>
<Set name="handler">
<New class="org.eclipse.jetty.server.handler.ResourceHandler">
<Set name="welcomeFiles">
<Array type="String">
<Item>index.html</Item>
</Array>
</Set>
<Set name="cacheControl">max-age=3600,public</Set>
</New>
</Set>
</Configure>
What I want is to be able to server any path like /*/html/ but this does not response to calls like /foo/html.
How can I config the path to server any like /foo/html /bar/html /baz/html ? If I set the context path like
<Set name="contextPath">/foo/html</Set><!--this one works -->
<Set name="contextPath">/bar/html</Set> <!-- this one works -->
<Set name="contextPath">/baz/html</Set> <!-- this one works -->
<Set name="contextPath">/*/html</Set> <!-- this one does not ! -->