aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-10-07 15:54:44 +0000
committerrpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-10-07 15:54:44 +0000
commit06a677a459cbcef5167c866145f09a2349e426a5 (patch)
tree7166330848321fb8a32cfe4c2f5c1e368b28b20c
parent2f458841dc2b3d1036853c7bd4428b4f01becc95 (diff)
downloadpdf-as-3-06a677a459cbcef5167c866145f09a2349e426a5.tar.gz
pdf-as-3-06a677a459cbcef5167c866145f09a2349e426a5.tar.bz2
pdf-as-3-06a677a459cbcef5167c866145f09a2349e426a5.zip
Added exeption handling for type at.gv.egiz.pdfas.exceptions.external.ExternalErrorException. Set session attribute ERROR_WITHIN_IFRAME to false to react to the out-redirection from iframe of online or mobile CCS.
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@858 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java
index 588a969..1936e41 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java
@@ -52,6 +52,8 @@ import at.gv.egiz.pdfas.api.PdfAs;
import at.gv.egiz.pdfas.api.commons.Constants;
import at.gv.egiz.pdfas.api.commons.SignatureInformation;
import at.gv.egiz.pdfas.api.exceptions.PdfAsException;
+import at.gv.egiz.pdfas.exceptions.external.ExternalErrorException;
+import at.gv.egiz.pdfas.exceptions.web.SessionExpiredException;
import at.gv.egiz.pdfas.api.internal.LocalBKUParams;
import at.gv.egiz.pdfas.api.internal.PdfAsInternal;
import at.gv.egiz.pdfas.api.verify.VerifyResult;
@@ -65,6 +67,7 @@ import at.gv.egiz.pdfas.web.helper.SigningTimeHelper;
import at.gv.egiz.pdfas.web.session.SessionAttributes;
import at.gv.egiz.pdfas.web.session.SignSessionInformation;
import at.gv.egiz.pdfas.web.session.VerifySessionInformation;
+import at.gv.egiz.pdfas.web.servlets.SignServlet;
import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
import at.knowcenter.wag.egov.egiz.exceptions.SignatureException;
@@ -155,6 +158,14 @@ public class DataURLServlet extends HttpServlet
}
}
+ catch (ExternalErrorException f) {
+ log.error(f.getMessage(), f);
+ HttpSession session = request.getSession(true);
+ session.setAttribute(SignServlet.ERROR_WITHIN_IFRAME, "false");
+ log.debug("Attribute ERROR_WITHIN_IFRAME: "+session.getAttribute(SignServlet.ERROR_WITHIN_IFRAME));
+ SignServlet.prepareDispatchToErrorPage(f, request);
+ dispatch(request, response, "/jsp/error.jsp");
+ }
catch (PdfAsException e)
{
log.error(e.getMessage(), e);