posts - 35,  comments - 7,  trackbacks - 0

          創建一個密鑰文件,
          %JAVA_HOME%/bin/keytool -genkey -alias myalias   -keyalg RSA  -validity 3650 -keystore ./mykeystorefilename

          修改conf/server.xml,打開Tomcat的HTTPS端口,
              <Connector port="8443"
                         maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                         enableLookups="false" disableUploadTimeout="true"
                         acceptCount="100" debug="0" scheme="https" secure="true"
                         keystoreFile="mykeystorefilepath" 
                         keystorePass="mykeystorepassword" >
                <Factory clientAuth="false" protocol="TLS" />
              </Connector>
             
          在應用中修改web.xml,增加授權區
          <security-constraint>
                  <web-resource-collection>
                          <url-pattern>/*</url-pattern>
                          <http-method>GET</http-method>
                          <http-method>POST</http-method>
                  </web-resource-collection>
                  <user-data-constraint>
                          <transport-guarantee>CONFIDENTIAL</transport-guarantee>
                  </user-data-constraint>
          </security-constraint>

          posted on 2006-01-21 21:32 java小記 閱讀(167) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          <2006年1月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          2930311234

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 庆云县| 浦城县| 泸西县| 芦溪县| 赤城县| 太白县| 康乐县| 师宗县| 东辽县| 乐安县| 民县| 惠州市| 定安县| 资阳市| 汽车| 辽源市| 宝坻区| 淳化县| 安顺市| 彭水| 静宁县| 广汉市| 徐州市| 托克托县| 启东市| 林周县| 壤塘县| 吉安县| 天祝| 沾化县| 峨边| 犍为县| 广平县| 兴宁市| 左贡县| 兴和县| 鄢陵县| 田阳县| 彭山县| 白水县| 横山县|