## Can I do CGI with Jetty?

Yes!

The Jetty distribution includes a CGI servlet org.mortbay.servlet.CGI. You configure it in your xml configuration file along these lines:

      <Call name="addContext">
        <Arg>/cgi-bin/*</Arg>
        <Set name="ResourceBase">/home/jules/www/cgi-bin</Set>
        <Set name="ServingDynamicServlets">TRUE</Set>
        <Call name="addServlet">
          <Arg>Common Gateway Interface</Arg>
          <Arg>/</Arg>
          <Arg>com.mortbay.Servlet.CGI</Arg>
         <Put name="Path">/usr/local/bin:/usr/ucb:/bin:/usr/bin</Put>
        </Call>
      </Call>

JettyFaq