How to make web container automatically change to SSL channel? (transport-guarantee)

来源:百度文库 编辑:神马文学网 时间:2024/05/02 01:45:00
OnceI observed that the web server brought me into an SSL channel after my clickinga link on a page which is accessed via a Non-SSL channel.
Iwondered how it did this at that time.
Infact it is so easy to implement this using Java. The only thing you need to setis the transport-guarantee in web.xml.
Below is a sample web.xml.



Resource protected by clientcert
/ProtectedByClientCert


members



CONFIDENTIAL



CLIENT-CERT
Client Cert Users-onlyArea

However, you must first enable the secure port of the webcontainer.
In above example you also need to make CLIENT-CERT workfirst.