配置tomcat在Tomcat 7上运行python脚本

时间:2014-10-30 09:58:09

标签: python tomcat

我有一个python脚本,我必须在tomcat上运行。我已经完成了对tomcat的web.xml文件的编辑,并取消了对cgi和servlet映射的servlet的注释。但仍在运行http://localhost:8080/cgi-bin/,它给出了“Servlet Cgi不可用”的错误。 现在该怎么办

1 个答案:

答案 0 :(得分:0)

我按照在线指令修改了conf / context.xml文件,将privileged =“true”添加到Context标签中,如下所示,并且有效。

<Context privileged="true">

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

</Context>