我在WCS7.0框架中工作。我必須對某些EJB的代碼進行異常處理,例如,如果發現finder異常,我必須在相應的jsp上顯示消息「數據未找到「。下面在Jsp和Ejb中使用WCS7.0的異常處理框架
是EJB代碼
TypedProperty delParam = new TypedProperty();
String shipid = rspProp.getString("shipid");
String addrId=rspProp.getString("addrId");
AddressAccessBean address = new AddressAccessBean();
address.setInitKey_AddressId(addrId);
try {
if((address.getMemberId().equals(memberid)) && address.getAddressField3().equals(shipid)){
address.getEJBRef().remove();
}
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CreateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FinderException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoveException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
我該怎麼辦,以顯示在JSP消息。