title: Passing Parameters using jetty contextHandler
body: <p>I'm wanting to make some custom endpoints that point to another endpoint in my jetty setup. For example, I already have and endpoint like <a href="http://myserver.com/app" rel="nofollow">http://myserver.com/app</a> that serves up a help page. Further, if I pass certain arguments, I get different pages. So for example <a href="http://myserver.com/app?app_id=56" rel="nofollow">http://myserver.com/app?app_id=56</a> might serve one app and <a href="http://myserver.com/app?app_id=48" rel="nofollow">http://myserver.com/app?app_id=48</a> might serve a static html page that documents functions. </p>
  
  <p>For the sake of some of the users, I'd like to set up simple endpoints for a few of the commonly used apps. So if a user went to <a href="http://myserver.com/docs" rel="nofollow">http://myserver.com/docs</a>, they'd should see the same thing as <a href="http://myserver.com/app?app_id=48" rel="nofollow">http://myserver.com/app?app_id=48</a>.</p>
  
  <p>I've been trying to accomplish this with .xml Configuration files. So far I've got it almost working.</p>
  
  <pre><code>&lt;?xml version="1.0"  encoding="ISO-8859-1"?&gt;
  &lt;!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.eclipse.org/configure.dtd"&gt;
  
  &lt;Configure class="org.eclipse.jetty.server.handler.ContextHandler"&gt;
    &lt;Set name="contextPath"&gt;/docs&lt;/Set&gt;
    &lt;Set name="resourceBase"&gt;http://localhost:8080&lt;/Set&gt;
    &lt;Set name="handler"&gt;
      &lt;New class="org.eclipse.jetty.server.handler.ResourceHandler"&gt;
        &lt;Set name="welcomeFiles"&gt;
          &lt;Array type="String"&gt;
            &lt;Item&gt;app&lt;/Item&gt;
          &lt;/Array&gt;
        &lt;/Set&gt;
        &lt;Set name="cacheControl"&gt;max-age=3600,public&lt;/Set&gt;
      &lt;/New&gt;
    &lt;/Set&gt;
  &lt;/Configure&gt;
  </code></pre>
  
  <p>Using this config file going to /docs serves the aforementioned help page which I would normally see by loading <a href="http://myserver.com/app" rel="nofollow">http://myserver.com/app</a>, my hangup is I can't figure out how to pass the appropriate app_id. </p>
  
  <p>I think I may end up creating some sort of custom handler but I'm not exactly sure how to go about implementing it. </p>
  
  <p>And just to complicate the issue, I also want to be able to pass some arbitrary parameter to my endpoint and have it passed along. So <a href="http://myserver.com/docs?foo=bar" rel="nofollow">http://myserver.com/docs?foo=bar</a> would display <a href="http://myserver.com/app?app_id=48&amp;foo=bar" rel="nofollow">http://myserver.com/app?app_id=48&amp;foo=bar</a>.</p>
  
  <p>Should I be going about this another way or can this all be accomplished through the config xml files?</p>