public ActionForward edit(ActionMapp ing mapping, ActionForm form,
HttpServletRequ est request, HttpServletResp onse response)
throws Exception {
MissionForm missionForm = (MissionForm) form;
String strMissionId = InsEncr.getSing leton().decrypt (missionForm.ge tMissionId().to String());
Long userEntityTypeI d = getUserEntityTy peId(request);
String strUserEntityTy peId = String.valueOf( userEntityTypeI d);
String actionForward = PARAM_EDIT_MISS ION;
if (!StringUtil.is Empty(strMissio nId)) {
actionForward = handleEditWhenM issionIsNotNew( strMissionId, mapping, request);
} else if (Constants.Enti tyType.NATIONAL .equals(strUser EntityTypeId) ||
Constants.Entit yType.SECTORIAL .equals(strUser EntityTypeId)) {
actionForward = handleAddMissio nWhenEntityIsNa tionalOrSectori al(request);
}
return mapping.findFor ward(actionForw ard);
}
In the above when i execute to add a new item its throwing exception null pointer exception
String strMissionId = InsEncr.getSing leton().decrypt (missionForm.ge tMissionId().to String());
so anyone can get the solution so that it shouldnot throw exception
advance thanks
HttpServletRequ est request, HttpServletResp onse response)
throws Exception {
MissionForm missionForm = (MissionForm) form;
String strMissionId = InsEncr.getSing leton().decrypt (missionForm.ge tMissionId().to String());
Long userEntityTypeI d = getUserEntityTy peId(request);
String strUserEntityTy peId = String.valueOf( userEntityTypeI d);
String actionForward = PARAM_EDIT_MISS ION;
if (!StringUtil.is Empty(strMissio nId)) {
actionForward = handleEditWhenM issionIsNotNew( strMissionId, mapping, request);
} else if (Constants.Enti tyType.NATIONAL .equals(strUser EntityTypeId) ||
Constants.Entit yType.SECTORIAL .equals(strUser EntityTypeId)) {
actionForward = handleAddMissio nWhenEntityIsNa tionalOrSectori al(request);
}
return mapping.findFor ward(actionForw ard);
}
In the above when i execute to add a new item its throwing exception null pointer exception
String strMissionId = InsEncr.getSing leton().decrypt (missionForm.ge tMissionId().to String());
so anyone can get the solution so that it shouldnot throw exception
advance thanks
Comment