In tomcat am writing these code:
In TestServlet: In servlet class written these code
Context envcontext=new InitialContext();
Context iniitContext=(Context)envcontext.lookup("java:/comp/env");
DataSource datasource=(DataSource)iniitContext.lookup("jdbc/Mysql");
Connection connection=datasource.getConnection();
Statement stmt=(Statement) connection.createStatement();
如何使用 Ecllipse 在 weblogic 中获取 MySQL 数据库 jndi 连接