this is servlet file
call the method
if(action.equals("Edit")||action.equals("New")){
cntrTypeCheck(conn,PPNo,destPort,pol,conn1);}conn.commit();
public void cntrTypeCheck(conn,PPNo,destPort,pol,conn1){
....
....
pstmt = conn.prepareStatement("select ......");
rs = pstmt.executeQuery();
while(rs.next()){
flag = true;
cntNo = rs.getString(1);
msg+=cntNo;
---
---
pstmt1 = conn1.prepareStatement("select ....");
rs1 = pstmt.executeQuery();
while(rs1.next()){
String offHire = rs.getString(1);
}
msg=msg+offHire;
if(pstmt1!= null)pstmt1.close();
if(rs1 != null) rs1.close();
det = rs.getString(6);
if(det== null)
det=" ";
messg+=det+".";
}catch(Exception exc){
.....
.....
}