Java‎ > ‎

Tips-tips di JSP


Print Stack Trace ke Halaman Web

e.printStackTrace(new java.io.PrintWriter(out));

Penanganan Connection di Tomcat


//Buat connection
try {
envContext  = (Context) initContext.lookup("java:/comp/env");
ds = (DataSource)envContext.lookup("jdbc/MyConnection");
}
catch(NamingException e)
{
out.println("PHI : Failed to get JNDI Environment !");
e.printStackTrace(new java.io.PrintWriter(out));
System.exit(1);
}


Comments