tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "franzR" <reitinger.fr...@utanet.at>
Subject AW: how to set environment variable in tomcat?
Date Tue, 25 Jun 2002 09:02:08 GMT

You can provide your servlet with the necessary information by using the
<context-param> section in your web.xml file.
For instance:

    <context-param>
        <param-name>SSL_CLIENT_CERT</param-name>
        <param-value>xxxxx</param-value>
    </context-param>

You can reference your parameters by:
	String ssl_param = (String) context.getInitParameter("SSL_CLIENT_CERT");

or you can use params for specific servlets:
<servlet>
        <servlet-name>MyServlet</servlet-name>
        <servlet-class>namespace.myServletImpl</servlet-class>
        <init-param>
            <param-name>SSL_CLIENT_CERT</param-name>
            <param-value>.....</param-value>
        </init-param>
</servlet>

Additional information concerning ssl can be found in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html


franzR

-----Urspr√ľngliche Nachricht-----
Von: Johnny [mailto:keongwh@mimos.my]
Gesendet: Dienstag, 25. Juni 2002 10:14
An: Tomcat Users List
Betreff: how to set environment variable in tomcat?



 Hi Ralph Einfeldt,

 Where can I find more detail guideline info about the startscript for
tomcat, and API doc of System.getenv()?

 Actually, I'm trying to set my own defined environment variable -
SSL_CLIENT_CERT in my jsp application. So that the application can retrieve
the certificate info from the smart card. Can I just use <context-param>'s
in web.xml. Which solution is much better?

 Regards,
 Johnny.


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message