天天看點

Element type

配置資料源是出現這個錯誤:Element type "Resource" must be followed by either attribute specifications, ">" or "/>".

搞了半天找不到

<Resource name="jdbc/epai"

       auth="Container"type="javax.sql.DataSource"  maxActive="100" 

       maxIdle="30" maxWait="10000"   username="sa"   password="accp"

      driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 

     url="jdbc:sqlserver://localhost:1433;databaseName=epai" >

  </Resource>

在context.xml中配置的這個沒一點問題,用IT把這個xml檔案打開時才發現錯誤了, auth="Container"type=。。這個地方中間要有空格。2個靠的太近了。如圖:

Element type