let your dao throw a use defined exception like (DataAccessException) ,
Catch this exception from servlet or jsp, from where ever the dao is called and forward to other page
if you are calling methods on dao directly from JSP
thn in ur jsp
try{
userDao.findUserById(123);
}catch(DataAccessException e){
//forward to some other page
}
sudhir
http://www.jyog.com