Martin Kuba wrote:
Hi,

I have a problem getting request attributes (like
SSL information and additional CGI variables) in Tomcat5.0.16
connected to Apache using mod_jk/1.2.5
It seems to be some problem with the new "Coyote/JK2 AJP 1.3"
connector, because it works in Tomcat4.1.29.
Please help.

I don't know about your problem, but most of the connector code is identical with TC 4.1.29 (in particular, the JK implementation is the same).


The code in CoyoteRequest.getAttribute from TC 5 seems fine, when compared to the code from TC 4.1.

Here are the details:

I have it working with Tomcat4.1.29, after some experiments
I figured out that in Apache's httpd.conf, I have to set

JkMount /myapp/* myworker
JkEnvVar SSL_CLIENT_S_DN "none"
<Location "/myapp/*">
  SSLOptions +ExportCertData +StdEnvVars
</Location>

so that mod_jk extracts the SSL-related information
from CGI variables, adds value of CGI variable specified by the JkEnvVar directive and sends the information to TomCat.
In Tomcat4.1.29's server.xml I can use both prepared connectors


<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8009" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="0"
               useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8010" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>

to get the information as request attributes,
but the older "Ajp13Connector" is better, because it
gets also the SSL_CLIENT_S_DN value, but "JkCoyoteHandler"
does not, it gets only the SSL attributes.

But in Tomcat5.0.16, with exactly the same Apache setup
and the standard Coyote connector in server.xml:

<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
           enableLookups="false" redirectPort="8443" debug="0"
           protocol="AJP/1.3" />

it sets no request attributes at all ! Is it a bug
in Tomcat5.0.16's Coyote connector or is something
wrong with my configuration ?

-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx Rémy Maucherat Senior Developer & Consultant JBoss Group (Europe) SàRL xxxxxxxxxxxxxxxxxxxxxxxxxxxxx


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to