Bookmark Topic Watch Topic
  • New Topic

IllegalStateException  RSS feed

 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanks Ben
I even tried with this code and iam getting IllegalStateException. My code is

<% if("Update".equalsIgnoreCase(action)){
message = "Vehicle/Insurance Taxes Updation ";
if(vehicle!=null && insuranceTax!=null &&
vehicle.getVehicleNo()!=null &&
vb.upDateVehicle(vehicle) &&
itb.updateInsuranceTaxes(insuranceTax)){
flag=false;
try{
response.sendRedirect("/sivashakthi/transport/edit/vehicleMasterEdit.jsp?action="+action+"&count=1");
}catch(Exception ise){
ise.printStackTrace();
}
}else{
response.sendRedirect("/sivashakthi/general/updateError.jsp?path="+request.getRequestURI()+"&message="+message);
}
}else if("Delete".equalsIgnoreCase(action)){
message = "Vehicle/Insurance Taxes Deletion ";
if(vehicle!=null && insuranceTax!=null && vehicle.getVehicleNo()!=null && vb.deleteVehicle(vehicle) && itb.deleteInsurance(insuranceTax)){
flag=false;
try{
response.sendRedirect("/sivashakthi/transport/edit/vehicleMasterEdit.jsp?count=1");

}catch(IllegalStateException ise){
ise.printStackTrace();
}
}else{
try{
//if(!response.isCommitted())
//System.out.println("un committed");
//else
//System.out.println("committed");

//or

//response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
//response.setHeader("Location","/sivashakthi/general/editError.jsp?path="+request.getRequestURI()+"&message="+message");

if(flag){
response.sendRedirect("/sivashakthi/general/editError.jsp?path="+request.getRequestURI()+"&message="+message);
return;
}

}catch(Exception e){
e.printStackTrace();
}
}
}
}else{
response.sendRedirect("/sivashakthi/general/sorry.jsp");
}
%>
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please reply in the same topic that you started rather than starting a new topic for the same question.

thanks
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!