Code: //Define Iterator iter String policyPath = ""; while (iter.hasNext()) { deductionL = (DeductionsLocal) iter.next(); String policyID = deductionL.getPolicyID(); policyL = policyH.findByPrimaryKey(policyID); if(policyL.getStatus().equalsIgnoreCase("READY TO GO INTO FORCE")||policyL.getStatus().equalsIgnoreCase("IN FORCE")) policyPath = "/NewBusiness/displayPolicyApproved.jsp"; else policyPath = Utils.getPolicyPath(policyL.getNextAction()); //other code //end loop } why is it that policyPath has nothing for the rest of the iterations?
Then you should be making the post in the relevant section. For now I could not get if its C# or Java so I have not moved it for you.
Code Java J2EE if(policyL.getStatus().equalsIgnoreCase("READY TO GO INTO FORCE")||policyL.getStatus().equalsIgnoreCase("IN FORCE")) policyPath = "/NewBusiness/displayPolicyApproved.jsp"; else policyPath = Utils.getPolicyPath(policyL.getNextAction()); I have found why it was not retaining anything. it is because when the if is not executed the else is executed but it retains an empty string because the argument policyL.getNextAction was not catered for in my Utils.getPolicyPath. i have managed to impliment it. thanks guys.