資料來源配置時加上編碼轉換格式後出問題了

2021-08-19 18:56:10 字數 579 閱讀 3559

xml檔案中配置jdbc源遇到問題 : the reference to entity "characterencoding" must end with the ';' delimiter

資料來源配置時加上編碼轉換格式後出問題了:

the reference to entity"characterencoding" must end with the ';' delimiter

這個錯誤就是 context.xml中設定資料來源鏈結url的問題  

urljdbc:mysql://localhost:3306/bookstore?useunicode=true&characterencoding=utf-8

正確的如下:

urljdbc:mysql://localhost:3306/bookstore?useunicode=true&characterencoding=utf-8

這大概是由xml檔案中的編碼規則決定要這麼變換。

在xml檔案中有以下幾類字元要進行轉義替換:

資料來源配置

1 建立資料庫student。2 新建表puser。3 設定資料來源,選擇windows選單 控制面板 管理工具 資料來源 odbc 彈出 odbc資料來源管理器 在彈出 odbc資料來源管理器 對話方塊中,選擇 系統dns 選項卡,單擊 新增 按鈕。在彈出的 建立新資料來源 對話方塊中,選擇 mi...

配置資料來源

jdbc.properties檔案 dzswb2b.druid.alias dbccfw dzswb2b.druid.driver url jdbc oracle thin 10.1.94.252 1521 dzsw dzswb2b.druid.username ccfw dzswb2b.druid...

struts config配置資料來源

struts config.xml中datasource配置說明 在config裡面申明datasource以後,你就可以在action中得到你需要的鏈結了。datasource datasource datasource servlet.getservletcontext getattribute...