about DAO

In a DAO class you have got an exception how do you forward this to a jsp and present the details
[104 byte] By [gopi_inga] at [2007-11-27 3:29:12]
# 1

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

Sudhir_nimavata at 2007-7-12 8:32:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...