" or "/>"."/>

Element type "Resource" must be followed by either attribute specifications, ">" or "/>".

配置数据源是出现这个错误: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个靠的太近了。如图:

原文地址:https://www.cnblogs.com/luleiitlife/p/8545103.html