Hi there!

I have made a strange observation with the cgi servlet (enabled in
local web.xml) using tomcat 9.0.117 (also *.111):

when I use a subdirectory as a url pattern, everything works fine,
but when I use a file suffix pattern, the scripts are not being found and
I am getting 404.

    <servlet>
        <servlet-name>cgi</servlet-name>
        <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
        <load-on-startup>5</load-on-startup>
        <init-param>
          <param-name>executable</param-name>
          <param-value>/usr/bin/python3</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
      <servlet-name>cgi</servlet-name>
      <url-pattern>/bin/*</url-pattern><!-- works -->
      <url-pattern>*.py</url-pattern><!-- does not work -->
    </servlet-mapping>

* Priviledged is enabled
* no cgiPathPrefix is set. 
* I tried with and without the executable init-param
* python is there and the script exists in ./simple.py and bin/simple.py

What's wrong here?

I can provide a minimal war file if needed.

Mit freundlichem Gruß / With kind regards
  Holger Klawitter

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to