Really I need to pass some vars from Apache to Tomcat using mod_jk.so (EAPI).
Thanks... -----Mensaje original----- De: Eduardo Jaunez S. [mailto:[EMAIL PROTECTED]] Enviado el: Martes, 18 de Febrero de 2003 10:20 Para: Tomcat-User (E-mail) CC: [EMAIL PROTECTED] Asunto: How pass environment vars from Apache to Tomcat Hi, I'm a newbie to Tomcat... I'm trying to pass some SSL env vars generated by mod_ssl in Apache (or any arbitrary one), to Tomcat+Axis WebServices. The documentation at Jakarta says that JkEnvVar is used to pass env vars from one side to the other, but it shows only one parameter and mod_jk cannot startup if there are less than two parameters. So I deduce to put (from other sources): # JkEnvVar <Environment_Name> <Default_Value> JkEnvVar SSL_CLIENT_CERT NONE I can't get the env vars at other side. I'm sure that mod_ssl did generate the variables, so they are visibles through the "printenv" CGI. In the Tomcat environment (jsp or jws) I used: System.getProperty() System.getProperties().propertyNames() and System.getenv() (but it's is deprecated and don't get compiled) They are allocated at another class? How can I access to its? Apache httpd.conf ----------------- ... JkWorkersFile /MyDir/jakarta-tomcat-4.1.18/conf/jkworkers.properties JkLogFile /MyDir/apache/logs/jk_log JkLogLevel debug JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat "%w %V %T" JkMount /MyTest/* jkworker # JkEnvVar <Environment_Name> <Default_Value> JkEnvVar SSL_CLIENT_CERT NONE # <--- Pass env var. ... MyJSP.jsp ---------- ... out.println("<h1>Here are the Properties:</h1>"); e= System.getProperties().propertyNames(); if( e!=null ) { out.println("<pre>"); for (;e.hasMoreElements();) { String key = (String) e.nextElement(); out.println("<font color=\"#FF8080\">"+key+"</font>" + ":=" + "<font color=\"#8080FF\">"+System.getProperty(key)+"</font>"); } out.println("</pre><p>"); } else { out.println("Properties are not accessible<p>"); } ... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]