problem with servlet code
hello guys...i am having some problems..the application runs fine until it reaches this bit of code..
if(mode=="w"){
System.out.println(" mode is weekly");
try{
ps4 =con.prepareStatement("UPDATE property SET tid=?,start=curdate(),days_due=adddate(start, 7) WHERE pid=?");
ps4.setInt(1, tid);
ps4.setInt(2, pid);
ps4.executeUpdate();
}
catch(SQLException e1){
e1.printStackTrace();
}
}
else if(mode=="m"){
System.out.println(" mode is monthly");
try{
ps4 =con.prepareStatement("UPDATE property SET tid=?,start=curdate(),days_due=adddate(start, 31) WHERE pid=?");
ps4.setInt(1, tid);
ps4.setInt(2, pid);
ps4.executeUpdate();
System.out.println(" property update query executed");
}
catch(SQLException e2){
System.out.println("property update Query not executed");
e2.printStackTrace();
}
}
whats wrong with it?
the log doesnt have any report printed in it for some reasons..which is quite a surprise since i have printStackTrace..please note that there are two queries precceeding this one and they all run to perfection and output suitable messages in the log..
whats wrong with this part?
please help

