tomcat 之 python 配置

1、修改conf/context.xml

<Context privileged="true">
    <WatchedResource>WEB-INF/web.xmlWatchedResource>
Context>

2、修改conf/web.xml

    <servlet>
        <servlet-name>cgiservlet-name>
        <servlet-class>org.apache.catalina.servlets.CGIServletservlet-class>
        <init-param>
          <param-name>debugparam-name>
          <param-value>0param-value>
        init-param>
        <init-param>
          <param-name>cgiPathPrefixparam-name>
          <param-value>WEB-INF/cgiparam-value>
        init-param>
        <init-param>
            <param-name>executableparam-name>
            <param-value>D:/Python36/python.exeparam-value>
        init-param>
         <load-on-startup>5load-on-startup>
    servlet>
    <servlet-mapping>
        <servlet-name>cgiservlet-name>
        <url-pattern>/cgi-bin/*url-pattern>
    servlet-mapping>

你可能感兴趣的:(python)