When using the local data source to connect the database, in the local project, it is possible, but a deployment to the server, the error.
The error reported was: javax.naming.namenotfoundexception:name[XXX] is not bound in the this context.
Check out the solution: Add the following code to the project's Web. xml
<resource-ref> <description>db connection</description> <res-ref-name>zjut_ echarts</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth> Container</res-auth> </resource-ref>
After joining, the mistake was gone, but a new error came up.
What to do, okay? The current solution is: C:\apache-tomcat-7.0.37\conf directory below the context.xml Delete, the Meta-inf directory in our project to copy the context.xml file to C: \ Under the apache-tomcat-7.0.37\conf directory
javax.naming.namenotfoundexception:name[XXX] is not bound in this context.