[Bug 61189] New: CGIServlet should be able to set specific environment variables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61189] New: CGIServlet should be able to set specific environment variables

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61189

            Bug ID: 61189
           Summary: CGIServlet should be able to set specific environment
                    variables
           Product: Tomcat 9
           Version: 9.0.0.M21
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: -----

org.apache.catalina.servlets.CGIServlet has a param 'passShellEnvironment'.
It would give more flexibility to allow for different environment variables per
CGI.

Examples:

- set HOME and HTTP_HOME to the nextcloud directory
- set SQWEBMAIL_MAXMSGSIZE for sqwebmail


For the sqwebmail example this could look for example like

      <init-param>
         <param-name>EnvironmentVariables</param-name>
       
<param-value>SQWEBMAIL_MAXARGSIZE=20000000|SQWEBMAIL_MAXATTSIZE=20000000|SQWEBMAIL_MAXMSGSIZE=20000000</param-value>
      </init-param>

I wrote my own CGI executor servlet for sqwebmail.
And today I need environment variables for Nextcloud.

I don't like to put them in /etc/init.d/tomcat or catalina.sh, because they may
be lost after a Tomcat update.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61189] CGIServlet should be able to set specific environment variables

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61189

--- Comment #1 from Konstantin Kolinko <[hidden email]> ---
> I don't like to put them in /etc/init.d/tomcat or catalina.sh, because they
> may be lost after a Tomcat update.

The place for custom environment variables in Apache Tomcat is bin/setenv.sh.
This is documented in RUNNING.txt.

http://tomcat.apache.org/tomcat-8.5-doc/RUNNING.txt

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...