Apache Camel - Servlet Component - is binding path variables possible?
<p>I have a servlet and using a camel route to listen request from the servlet as below:</p>
<pre><code> from(&quot;servlet:///basepath?matchOnUriPrefix=true&quot;)
</code></pre>
<p>There is no problem with that, since matchOnUriPrefix is true, requests for the following url pattern are successfully listened by the route:</p>
<p><em><strong>host:port/basepath/dynamicSubPath</strong></em></p>
<p>What I want to have is that, is there any way that I can make the path variable (dynamicSubPath) to bind to an exchange property?</p>
<p>I know that I can get the path as below:</p>
<pre><code> String path = exchange.getIn().getHeader(Exchange.HTTP_PATH, String.class);
</code></pre>
<p>But I dont want to do such string parsing. In spring mvc I can inject path variables to the controller as below:</p>
<pre><code> @RequestMapping(path = &quot;/basepath/{dynamicSubPath}&quot;, method = RequestMethod.GET)
</code></pre>
<p>and then can get the dynamicSubPath variable as below:</p>
<pre><code> @PathVariable String dynamicSubPath
</code></pre>
<p>Is there a similar thing possible for  camel servlet component?</p>