aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/jsp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/jsp')
-rw-r--r--src/main/webapp/jsp/error.jsp44
-rw-r--r--src/main/webapp/jsp/null_request_page.jsp51
-rw-r--r--src/main/webapp/jsp/redirect_to_parent.jsp24
3 files changed, 100 insertions, 19 deletions
diff --git a/src/main/webapp/jsp/error.jsp b/src/main/webapp/jsp/error.jsp
index 2183a62..4bd49a4 100644
--- a/src/main/webapp/jsp/error.jsp
+++ b/src/main/webapp/jsp/error.jsp
@@ -2,6 +2,10 @@
<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %>
<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.SignServlet" %>
<%@ page import="at.knowcenter.wag.egov.egiz.exceptions.*" %>
+<%@ page import="at.gv.egiz.pdfas.web.SignSessionInformation" %>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %>
+<%@ page import="org.apache.commons.httpclient.util.EncodingUtil" %>
+<%@ page import="org.apache.commons.httpclient.NameValuePair" %>
<%@ page import="java.io.*" %>
<%@ include file="language.jsp" %>
@@ -22,9 +26,39 @@
SignServlet.prepareDispatchToErrorPage(pe, request);
}
- String error = (request.getAttribute("error") == null ? "" : request.getAttribute("error").toString());
- String cause = (request.getAttribute("cause") == null ? "" : request.getAttribute("cause").toString());
+ String error = request.getParameter("error");
+ boolean paramInvok = false;
+ if (error == null) {
+ error = (request.getAttribute("error") == null ? "" : request.getAttribute("error").toString());
+ } else {
+ paramInvok = true;
+ }
+ String cause = request.getParameter("cause");
+ if (cause == null) {
+ cause = (request.getAttribute("cause") == null ? "" : request.getAttribute("cause").toString());
+ } else {
+ paramInvok = true;
+ }
boolean rb = Boolean.TRUE.equals((Boolean) request.getAttribute("resourcebundle"));
+ SignSessionInformation si = (SignSessionInformation) session.getAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION);
+
+ boolean isExternalInvocation = (si != null && si.exappinf != null);
+
+ if (isExternalInvocation) {
+ String urlParams = EncodingUtil.formUrlEncode(new NameValuePair[] { new NameValuePair("error", error), new NameValuePair("cause", cause) }, "ISO8859_1");
+ if (si.exappinf.invoke_error_url == null) {
+ // prevent circular redirect
+ si.exappinf = null;
+ String redirectUrl = response.encodeRedirectURL(request.getContextPath() + "/jsp/error.jsp" + "?" + urlParams);
+ session.setAttribute(SessionAttributes.PARENT_WEBAPP_REDIRECT_URL, redirectUrl);
+ } else {
+ String errorUrl = si.exappinf.invoke_error_url + "?" + urlParams;
+ session.setAttribute(SessionAttributes.PARENT_WEBAPP_REDIRECT_URL, errorUrl);
+ }
+ String redirectHelper = response.encodeRedirectURL(request.getContextPath() + "/jsp/redirect_to_parent.jsp");
+ response.sendRedirect(redirectHelper);
+ }
+
%>
<body>
@@ -40,8 +74,10 @@
<fmt:message key="<%= cause %>"/>
<% } else { out.write(cause); } %>
</strong></div>
- <div class="pdfasverticalspace"></div>
- <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/"><fmt:message key="common.back"/></a>
+ <% if (!isExternalInvocation && !paramInvok) { %>
+ <div class="pdfasverticalspace"></div>
+ <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/"><fmt:message key="common.back"/></a>
+ <% } // end if %>
<pre style="display:none">
<%
if (pe != null) {
diff --git a/src/main/webapp/jsp/null_request_page.jsp b/src/main/webapp/jsp/null_request_page.jsp
index 4dd3d02..6d1008a 100644
--- a/src/main/webapp/jsp/null_request_page.jsp
+++ b/src/main/webapp/jsp/null_request_page.jsp
@@ -2,16 +2,18 @@
<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.UpdateFormServlet"%>
<%@ page import="java.util.Locale" %>
<%@ page import="at.gv.egiz.pdfas.api.commons.Constants" %>
+<%@ page import="at.gv.egiz.pdfas.web.SignSessionInformation" %>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %>
<%@ include file="language.jsp" %>
<%
String local_request_url = (String)request.getAttribute("local_request_url");
- String data_url = (String)request.getAttribute("data_url");
- String device = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_DEVICE_KEY);
+ String data_url = (String) request.getAttribute("data_url");
+ SignSessionInformation si = (SignSessionInformation) session.getAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION);
Locale locale = (Locale) session.getAttribute(LocaleParamFilter.LOCALE_SESSION_KEY);
- boolean isOnlineMOCCA = Constants.SIGNATURE_DEVICE_MOC.equals(device);
+ boolean isExternalInvocation = (si != null && si.exappinf != null);
+ boolean isServerBKU = Constants.SIGNATURE_DEVICE_MOC.equals(si.connector);
%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
@@ -37,10 +39,15 @@
</head>
<body>
- <h1><fmt:message key="common.title"/></h1>
- <h2><fmt:message key="nullrequestpage.heading2"/></h2>
- <% if (isOnlineMOCCA) { %>
- <div class="pdfasnote"><fmt:message key="nullrequestpage.note.server"/></div>
+ <% if (!isExternalInvocation) { %>
+ <h1><fmt:message key="common.title"/></h1>
+ <h2><fmt:message key="nullrequestpage.heading2"/></h2>
+ <% } // end if %>
+
+ <% if (isServerBKU) { %>
+ <% if (!isExternalInvocation) { %>
+ <div class="pdfasnote"><fmt:message key="nullrequestpage.note.server"/></div>
+ <% } // end if %>
<form action="<%= local_request_url %>" name="submitform" accept-charset="UTF-8" method="post" target="moccaframe">
<input type="hidden" name="XMLRequest" value="<?xml version='1.0' encoding='UTF-8'?><NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>" />
<input type="hidden" name="DataURL" value="<%= data_url %>" />
@@ -50,19 +57,33 @@
<input type="hidden" name="locale" value="<%= locale.toString() %>"/>
<% } // end if %>
</form>
- <div class="pdfasverticalspace"></div>
- <iframe name="moccaframe" style="border: 1px solid black;" width="190" height="130" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" src="<%= request.getContextPath() %>/jsp/please_wait.jsp" ></iframe>
+ <% if (!isExternalInvocation) { %>
+ <div class="pdfasverticalspace"></div>
+ <iframe name="moccaframe" style="border: 1px solid black;" width="190" height="130" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" src="<%= request.getContextPath() %>/jsp/please_wait.jsp" ></iframe>
+ <% } else { // end if %>
+ <iframe name="moccaframe" style="border: 1px none black;" width="190" height="130" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" src="<%= request.getContextPath() %>/jsp/please_wait.jsp" ></iframe>
+ <% } // end if %>
+
<% } else { %>
- <div class="pdfasnote"><fmt:message key="nullrequestpage.note.local"/></div>
- <div class="pdfasverticalspace"></div>
+ <% if (isExternalInvocation) { %>
+ <div class="pdfasnote" style="padding:10px 10px 10px 10px;"><fmt:message key="nullrequestpage.note.local"/></div>
+ <% } else { %>
+ <div class="pdfasnote"><fmt:message key="nullrequestpage.note.local"/></div>
+ <div class="pdfasverticalspace"></div>
+ <% } // end if %>
<form action="<%= local_request_url %>" name="submitform" accept-charset="UTF-8" method="post">
<input type="hidden" name="XMLRequest" value="<?xml version='1.0' encoding='UTF-8'?><NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>" />
<input type="hidden" name="DataURL" value="<%= data_url %>" />
- <input type="submit" id="SendRequestButton" value="<fmt:message key="nullrequestpage.button.submit"/>" />
+ <% if (!isExternalInvocation) { %>
+ <input type="submit" id="SendRequestButton" value="<fmt:message key="nullrequestpage.button.submit"/>" />
+ <% } // end if %>
</form>
<% } // end if %>
- <div class="pdfasverticalspace"></div>
- <a href="<%= request.getContextPath() %>/"><fmt:message key="common.back"/></a>
+
+ <% if (!isExternalInvocation) { %>
+ <div class="pdfasverticalspace"></div>
+ <a href="<%= request.getContextPath() %>/"><fmt:message key="common.back"/></a>
+ <% } // end if %>
<script language="javascript" type="text/javascript">
<!--
window.setTimeout("hitButton()", 800);
diff --git a/src/main/webapp/jsp/redirect_to_parent.jsp b/src/main/webapp/jsp/redirect_to_parent.jsp
new file mode 100644
index 0000000..7791109
--- /dev/null
+++ b/src/main/webapp/jsp/redirect_to_parent.jsp
@@ -0,0 +1,24 @@
+<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage=""%>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %>
+
+
+<%@ include file="language.jsp" %>
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <title><fmt:message key="pleasewait.title"/></title>
+ <%
+ String query = (String) session.getAttribute(SessionAttributes.PARENT_WEBAPP_REDIRECT_URL);
+ session.removeAttribute(SessionAttributes.PARENT_WEBAPP_REDIRECT_URL);
+ %>
+</head>
+
+<body>
+ <form action="<%= query %>" method="post" name="redirectform" id="redirectform" target="_parent">
+ </form>
+ <script language="javascript" type="text/javascript">
+ <!--
+ document.redirectform.submit();
+ -->
+ </script>
+</body>