<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*,java.io.*" %> <% Connection con; ResultSet rs,rs1,rs2,rs3,rs4,rs5,rs6,rs7; Statement st,st1,st2,st3,st4,st5,st6,st7; String username1="", username2=""; String name1="", name2=""; String image1="", image2=""; File f1=null, f2=null; %> <% try { Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost/iitDB","root","91don699629"); st=con.createStatement(); rs=st.executeQuery("select username,name from adminfac order by id"); %> Department of Biotechnology


Faculty
 
<% while(rs.next()) { username1 = rs.getString(1); name1 = rs.getString(2); f1= new File(application.getRealPath(".")+ "/iit/Photo/"+ username1+"/personal"); f1.mkdirs(); String fr1[] = f1.list(); if(fr1.length>0) image1 = "Photo/"+username1+"/personal/"+fr1[0]; else image1 = "images/default.bmp"; if(rs.next()) { username2 = rs.getString(1); name2 = rs.getString(2); f2 = new File(application.getRealPath(".")+ "/iit/Photo/"+ username2+"/personal"); f2.mkdirs(); String fr2[] = f2.list(); if(fr2.length>0) image2 = "Photo/"+username2+"/personal/"+fr2[0]; else image2 = "images/default.bmp"; } %> <% } %>
 





 

 
<% con.close(); } catch(SQLException sqle){ System.err.println(sqle.getMessage()); } catch (ClassNotFoundException cnfe){ System.err.println(cnfe.getMessage()); } catch (Exception e){ e.printStackTrace(); out.println(e.getMessage()); out.println("sql Exexption"); } %>