<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 15, 文章 - 0, 評(píng)論 - 5, 引用 - 0
    數(shù)據(jù)加載中……

    2008年8月1日

    4xx - 客戶端錯(cuò)誤

    發(fā)生錯(cuò)誤,客戶端似乎有問題。例如,客戶端請(qǐng)求不存在的頁面,客戶端未提供有效的身份驗(yàn)證信息。 ·400 - 錯(cuò)誤的請(qǐng)求。
    ·401 - 訪問被拒絕。IIS 定義了許多不同的 401 錯(cuò)誤,它們指明更為具體的錯(cuò)誤原因。這些具體的錯(cuò)誤代碼在瀏覽器中顯示,但不在 IIS 日志中顯示: ·401.1 - 登錄失敗。
    ·401.2 - 服務(wù)器配置導(dǎo)致登錄失敗。
    ·401.3 - 由于 ACL 對(duì)資源的限制而未獲得授權(quán)。
    ·401.4 - 篩選器授權(quán)失敗。
    ·401.5 - ISAPI/CGI 應(yīng)用程序授權(quán)失敗。
    ·401.7 – 訪問被 Web 服務(wù)器上的 URL 授權(quán)策略拒絕。這個(gè)錯(cuò)誤代碼為 IIS 6.0 所專用。

    ·403 - 禁止訪問:IIS 定義了許多不同的 403 錯(cuò)誤,它們指明更為具體的錯(cuò)誤原因: ·403.1 - 執(zhí)行訪問被禁止。
    ·403.2 - 讀訪問被禁止。
    ·403.3 - 寫訪問被禁止。
    ·403.4 - 要求 SSL。
    ·403.5 - 要求 SSL 128。
    ·403.6 - IP 地址被拒絕。
    ·403.7 - 要求客戶端證書。
    ·403.8 - 站點(diǎn)訪問被拒絕。
    ·403.9 - 用戶數(shù)過多。
    ·403.10 - 配置無效。
    ·403.11 - 密碼更改。
    ·403.12 - 拒絕訪問映射表。
    ·403.13 - 客戶端證書被吊銷。
    ·403.14 - 拒絕目錄列表。
    ·403.15 - 超出客戶端訪問許可。
    ·403.16 - 客戶端證書不受信任或無效。
    ·403.17 - 客戶端證書已過期或尚未生效。
    ·403.18 - 在當(dāng)前的應(yīng)用程序池中不能執(zhí)行所請(qǐng)求的 URL。這個(gè)錯(cuò)誤代碼為 IIS 6.0 所專用。
    ·403.19 - 不能為這個(gè)應(yīng)用程序池中的客戶端執(zhí)行 CGI。這個(gè)錯(cuò)誤代碼為 IIS 6.0 所專用。
    ·403.20 - Passport 登錄失敗。這個(gè)錯(cuò)誤代碼為 IIS 6.0 所專用。

    ·404 - 未找到。 ·404.0 -(無) – 沒有找到文件或目錄。
    ·404.1 - 無法在所請(qǐng)求的端口上訪問 Web 站點(diǎn)。
    ·404.2 - Web 服務(wù)擴(kuò)展鎖定策略阻止本請(qǐng)求。
    ·404.3 - MIME 映射策略阻止本請(qǐng)求。

    ·405 - 用來訪問本頁面的 HTTP 謂詞不被允許(方法不被允許)
    ·406 - 客戶端瀏覽器不接受所請(qǐng)求頁面的 MIME 類型。
    ·407 - 要求進(jìn)行代理身份驗(yàn)證。
    ·412 - 前提條件失敗。
    ·413 – 請(qǐng)求實(shí)體太大。
    ·414 - 請(qǐng)求 URI 太長。
    ·415 – 不支持的媒體類型。
    ·416 – 所請(qǐng)求的范圍無法滿足。
    ·417 – 執(zhí)行失敗。
    ·423 – 鎖定的錯(cuò)誤。

    posted @ 2008-08-04 14:16 zhouzhou@ 閱讀(312) | 評(píng)論 (1)編輯 收藏

    小結(jié) Commons BeanUtils

     

    Commons BeanUtils 的官方網(wǎng)址:http://commons.apache.org/beanutils/

    Commins BeanUtils是針對(duì)JavaBeans一般性操作的組件,可以用來對(duì)JavaBeans進(jìn)行復(fù)制,屬性的讀取,設(shè)置,修改,還以動(dòng)態(tài)構(gòu)造JavaBeans對(duì)象。

    使用這個(gè)組件需要三個(gè)Jar文件
    其中兩個(gè)是 commons-logging-1.1.1下的commons-logging-1.1.1.jar 和commons-logging-api-1.1.1.jar
    剩下一個(gè)是   commons-beanutils-1.8.0-BETA   下的commons-beanutils-1.8.0-BETA.jar
    把這三個(gè)加入到項(xiàng)目的構(gòu)件路徑下即可。

    下面為一個(gè)簡單的例子

    新建User Profile Address BeanUtilsExample 四個(gè)類


    1 User.java

    package com.v503.zhouzhou;

    public class User {
     private Long userId;
     private String username;
     private String password;
     private Profile profile;

     public Long getUserId() {
      return userId;
     }

     public  void setUserId(Long userId) {
      this.userId = userId;
     }

     public String getUsername() {
      return username;
     }

     public void setUsername(String username) {
      this.username = username;
     }

     public String getPassword() {
      return password;
     }

     public void setPassword(String password) {
      this.password = password;
     }

     public Profile getProfile() {
      return profile;
     }

     public void setProfile(Profile profile) {
      this.profile = profile;
     }

    }

    2 Profile.java

    package com.v503.zhouzhou;

    import java.util.Date;
    import java.util.Map;

     

    public class Profile {
     private Map<String, String> phone;
     private Address[] address;
     private Date birthDate;
     private String email;

     public Map<String, String> getPhone() {
      return phone;
     }

     public void setPhone(Map<String, String> phone) {
      this.phone = phone;
     }

     public Address[] getAddress() {
      return address;
     }

     public void setAddress(Address[] address) {
      this.address = address;
     }

     public Date getBirthDate() {
      return birthDate;
     }

     public void setBirthDate(Date birthDate) {
      this.birthDate = birthDate;
     }

     public String getEmail() {
      return email;
     }

     public void setEmail(String email) {
      this.email = email;
     }

    }



    3 Address.java

    package com.v503.zhouzhou;

    public class Address {
     private String postCode;
     private String country;
     private String city;
     private String addr;

     public Address() {

     }

     public Address(String postCode, String country, String city, String addr) {
      this.postCode = postCode;
      this.country = country;
      this.city = city;
      this.addr = addr;
     }

     public String getPostCode() {
      return postCode;
     }

     public void setPostCode(String postCode) {
      this.postCode = postCode;
     }

     public String getCountry() {
      return country;
     }

     public void setCountry(String country) {
      this.country = country;
     }

     public String getCity() {
      return city;
     }

     public void setCity(String city) {
      this.city = city;
     }

     public String getAddr() {
      return addr;
     }

     public void setAddr(String addr) {
      this.addr = addr;
     }

    }



    4 BeanUtilsExample.java


    package com.v503.zhouzhou;

    import java.lang.reflect.InvocationTargetException;
    import java.util.GregorianCalendar;
    import java.util.HashMap;
    import java.util.Map;

    import org.apache.commons.beanutils.BeanUtils;
    import org.apache.commons.beanutils.PropertyUtils;


    public class BeanUtilsExamples {

     @SuppressWarnings("unused")
     private User prepareData() {
      Address[] address = { new Address("111111", "中國", "保定", "河北大學(xué)"),
        new Address("22222", "中國", "保定", "河北大學(xué)工商學(xué)院") };
      Profile profile = new Profile();
      profile.setBirthDate(new GregorianCalendar(1987, 04, 17).getTime());
      profile.setEmail("aa1987417@126.com");
      Map<String, String> phone = new HashMap<String, String>();
      phone.put("mobilephone", "1532222706");
      phone.put("home", "110");
      profile.setPhone(phone);
      profile.setAddress(address);

      User user = new User();
      user.setUserId(new Long(503));
      user.setUsername("zhouzhou");
      user.setProfile(profile);
      user.setPassword("hicc");
      return user;

     }

     public static void main(String[] args) {
      BeanUtilsExamples a = new BeanUtilsExamples();
      User user = a.prepareData();
      System.out.println("輸出對(duì)象的屬性值---------------------------------");
      try {
       System.out.println(BeanUtils.getProperty(user, "userId"));       //BeanUtils中讀取屬性的方法getProperty()
       System.out.println(BeanUtils.getProperty(user, "username"));
       System.out.println(BeanUtils.getProperty(user, "password"));
       System.out.println(BeanUtils.getProperty(user, "profile.email"));
       System.out.println(BeanUtils.getProperty(user, "profile.birthDate"));
       System.out.println(BeanUtils.getProperty(user, "profile.phone(home)"));
       System.out.println(BeanUtils.getProperty(user, "profile.phone(mobilephone)"));
       System.out.println(BeanUtils.getProperty(user, "profile.address[0].city"));
       System.out.println(PropertyUtils.getProperty(user, "profile.address[1].country"));
       
       User user2 = new User();
       BeanUtils.copyProperties(user2, user); //BeanUtils中復(fù)制屬性的方法getProperty()

       System.out.println("輸出復(fù)制屬性的屬性值-------------------------------");
       System.out.println(BeanUtils.getProperty(user, "username"));
       System.out.println(BeanUtils.getProperty(user, "profile.birthDate"));
       System.out.println(BeanUtils.getProperty(user, "profile.phone(home)"));
       System.out.println(BeanUtils.getProperty(user, "profile.address[0].city"));
       
       
       System.out.println("輸出復(fù)制屬性修改以后的屬性值---------------------");
       BeanUtils.setProperty(user2, "userId", new Long(8888888));   //設(shè)置屬性的方法
       PropertyUtils.setProperty(user2, "username", "周旭");
       BeanUtils.setProperty(user2, "profile.email", "549748067@qq.com");
       BeanUtils.setProperty(user2, "profile.birthDate", new GregorianCalendar(2008, 8, 1).getTime());
       BeanUtils.setProperty(user2, "profile.address[0]", new Address("6666666", "中國","紫園","保定"));
       System.out.println(BeanUtils.getProperty(user2, "userId"));
       System.out.println(BeanUtils.getProperty(user2, "username"));
       System.out.println(BeanUtils.getProperty(user2, "profile"));
       System.out.println(BeanUtils.getProperty(user2, "profile.email"));
       System.out.println(BeanUtils.getProperty(user2, "profile.birthDate"));
       System.out.println(BeanUtils.getProperty(user2, "profile.address[0].city"));

       System.out.println("與被復(fù)制屬性值的對(duì)象的比較-------------------------------");
       System.out.println(BeanUtils.getProperty(user, "userId"));
       System.out.println(BeanUtils.getProperty(user, "username"));
       System.out.println(BeanUtils.getProperty(user, "profile"));
       System.out.println(BeanUtils.getProperty(user, "profile.email"));
       System.out.println(BeanUtils.getProperty(user, "profile.birthDate"));
       System.out.println(BeanUtils.getProperty(user, "profile.address[0].city"));
      } catch (IllegalAccessException e) {

       e.printStackTrace();
      } catch (InvocationTargetException e) {

       e.printStackTrace();
      } catch (NoSuchMethodException e) {

       e.printStackTrace();
      }

     }

    }


     




     

    posted @ 2008-08-01 10:38 zhouzhou@ 閱讀(593) | 評(píng)論 (0)編輯 收藏

    主站蜘蛛池模板: 亚洲国产高清视频| 亚洲人成无码网站久久99热国产| 亚洲精品无码av人在线观看| 边摸边吃奶边做爽免费视频99 | 亚洲国产成人久久综合碰碰动漫3d| 男女拍拍拍免费视频网站| 亚洲国产成人精品91久久久 | 国产在线观看免费视频软件| 亚洲天堂中文字幕在线| 一级中文字幕免费乱码专区| 免费福利电影在线观看| 亚洲av日韩av高潮潮喷无码| 久久精品视频免费看| 亚洲视频在线观看不卡| 无码国产精品一区二区免费式直播 | 免费看片A级毛片免费看| 亚洲精品美女网站| 性感美女视频免费网站午夜 | 最新69国产成人精品免费视频动漫| 亚洲日韩精品无码专区加勒比☆| 成人免费福利电影| 美女啪啪网站又黄又免费| 亚洲乱码国产一区网址| 韩日电影在线播放免费版| 久久狠狠高潮亚洲精品| 毛片在线免费视频| 亚洲av无码一区二区三区网站 | 国产免费一区二区三区在线观看| 亚洲日本va午夜中文字幕一区| 亚洲免费网站在线观看| 亚洲伊人久久大香线蕉AV| 免费v片视频在线观看视频| 国产伦精品一区二区免费| 亚洲AV永久青草无码精品| 成人无码区免费A片视频WWW| 色费女人18女人毛片免费视频| 亚洲精品乱码久久久久久蜜桃不卡 | 国产成人亚洲综合无码精品| 91在线视频免费91| 九九综合VA免费看| 亚洲精品电影天堂网|