I am using a iframe for displaying image on the page. iframe is making action call on page load and action is returning fileinputstream. My question is if file is not available then action is breaking up and throwing error on the page. So, how would i handle that error if resource is not available on the server.
Way I am making action call through iframe is
$('#imgLogo').attr('src', '../employer/DisplayLogoOnLoad.action');
And my action looks like
companyLogo = getLogoPath();
companyLogo = getClass().getClassLoader().getResource("../../images/" + companyLogo)
.getPath();
inputStream = new FileInputStream(new File(companyLogo));
return SUCCESS;
Please suggest me the way to handle iframe image if null resource.