diff options
21 files changed, 189 insertions, 37 deletions
diff --git a/dok/Hinweise-zur-PDF-AS-Konfiguration.pdf b/dok/Hinweise-zur-PDF-AS-Konfiguration.pdf Binary files differdeleted file mode 100644 index d6fdd13..0000000 --- a/dok/Hinweise-zur-PDF-AS-Konfiguration.pdf +++ /dev/null @@ -9,7 +9,7 @@ <groupId>knowcenter</groupId>
<artifactId>pdf-as</artifactId>
<name>PDF-AS</name>
- <version>3.0.9-20090129</version>
+ <version>3.0.9-20090203</version>
<!-- don't forget to set the version string at.knowcenter.wag.egov.egiz.PdfAS.PDFAS_VERSION accordingly -->
<description>Amtssignatur fuer elektronische Aktenfuehrung</description>
@@ -129,7 +129,7 @@ <descriptor>src/main/assembly/assemble_libraries.xml</descriptor>
<descriptor>src/main/assembly/assemble_distribution_ws.xml</descriptor>
<descriptor>src/main/assembly/assemble_repository.xml</descriptor>
- <descriptor>src/main/assembly/assemble_repository.xml</descriptor>
+ <descriptor>src/main/assembly/assemble_distribution_brz.xml</descriptor>
-->
<descriptor>src/main/assembly/assemble_distribution_brz.xml</descriptor>
</descriptors>
diff --git a/src/main/java/at/gv/egiz/pdfas/utils/ConfigUtils.java b/src/main/java/at/gv/egiz/pdfas/utils/ConfigUtils.java index a7bca3f..34de789 100644 --- a/src/main/java/at/gv/egiz/pdfas/utils/ConfigUtils.java +++ b/src/main/java/at/gv/egiz/pdfas/utils/ConfigUtils.java @@ -260,6 +260,7 @@ public final class ConfigUtils { String infoConfiguration = " configuration path = \"" + SettingsReader.CONFIG_PATH + "\"";
String infoCertStore = " certstore path = \"" + SettingsReader.CERT_PATH + "\"";
String infoTempPath = " temporary path = \"" + SettingsReader.TMP_PATH + "\"";
+ String encoding = " file.encoding = \"" + System.getProperty("file.encoding") + "\"";
if (logger != null) {
logger.info(separator);
@@ -267,6 +268,7 @@ public final class ConfigUtils { logger.info(infoConfiguration);
logger.info(infoCertStore);
logger.info(infoTempPath);
+ logger.info(encoding);
logger.info(separator);
} else {
StringBuffer buffer = new StringBuffer();
@@ -275,6 +277,7 @@ public final class ConfigUtils { buffer.append(infoConfiguration).append(SystemUtils.LINE_SEPARATOR);
buffer.append(infoCertStore).append(SystemUtils.LINE_SEPARATOR);
buffer.append(infoTempPath).append(SystemUtils.LINE_SEPARATOR);
+ buffer.append(encoding).append(SystemUtils.LINE_SEPARATOR);
buffer.append(separator);
System.out.println(buffer.toString());
}
diff --git a/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java b/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java index 6fc7a1a..113169c 100644 --- a/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java +++ b/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java @@ -12,10 +12,12 @@ import javax.servlet.ServletContext; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import at.gv.egiz.pdfas.api.commons.Constants;
import at.gv.egiz.pdfas.framework.SignatorFactory;
import at.gv.egiz.pdfas.framework.signator.Signator;
import at.gv.egiz.pdfas.impl.output.ByteArrayDataSink;
@@ -33,6 +35,7 @@ import at.knowcenter.wag.egov.egiz.sig.connectors.bku.SignSignatureObject; import at.knowcenter.wag.egov.egiz.web.FormFields;
import at.knowcenter.wag.egov.egiz.web.LocalRequestHelper;
import at.knowcenter.wag.egov.egiz.web.PDFContainer;
+import at.knowcenter.wag.egov.egiz.web.SessionAttributes;
import at.knowcenter.wag.egov.egiz.web.servlets.ProvidePDFServlet;
/**
@@ -148,7 +151,7 @@ public class SignServletHelper si.output = TempDirHelper.createTempDataSink(si.filename + "_signed.pdf");
signator.finishSign(si.si, si.output);
- returnSignResponse(si, response);
+ returnSignResponse(si, request, response);
log.debug("finishSign finished."); //$NON-NLS-1$
}
@@ -158,12 +161,13 @@ public class SignServletHelper *
* @param si
* SessionInformation.
+ * @parem request The servlet request.
* @param response
* The servlet response.
* @throws IOException
* The IO Exception.
*/
- public static void returnSignResponse(SignSessionInformation si, HttpServletResponse response) throws IOException
+ public static void returnSignResponse(SignSessionInformation si, HttpServletRequest request, HttpServletResponse response) throws IOException
{
// SignResult sign_result = si.sign_result;
@@ -194,7 +198,13 @@ public class SignServletHelper }
else
{
- // TODO @tzefferer: what is this code?
+ /**
+ * The following code handles an external invocation of pdf-as. External invocation is done by
+ * redirecting the user to the Sign-Servlet using the parameters defined in class
+ * at.knowcenter.wag.egov.egiz.web.FormFields.
+ * e.g. http://localhost:48080/pdf-as/Sign?preview=false&connector=bku&mode=textual&sig_type=SIGNATURBLOCK_DE&inline=false&filename=test.pdf&num-bytes=45916&pdf-url=http%3A%2F%2Flocalhost%3A8080%2Fmyapp%2FProvidePDF&pdf-id=1956507909008215134&invoke-app-url=https%3A%2F%2Flocalhost%3A8443%2Fmyapp%2FReturnSignedPDF&invoke-app-error-url=https%3A%2F%2Flocalhost%3A8443%2Fmyapp%2Fpdfaserror.do&session-id=9085B85B364BEC31E7D38047FE54577D&locale=de
+ */
+ log.debug("External webapp invocation detected.");
byte [] signed_pdf = null;
if (si.output instanceof FileBasedDataSink)
{
@@ -236,9 +246,26 @@ public class SignServletHelper + sep + FormFields.FIELD_PDF_URL + "=" + providePDFServlet + "&" + FormFields.FIELD_PDF_ID
+ "=" + pdf_id + "&" + FormFields.FIELD_FILE_LENGTH + "=" + signed_pdf.length;
- log.debug("Notifying external application by redirecting to \"" + query + "\".");
-
- response.sendRedirect(query);
+ /*
+ * Using the external web-interface of pdf-as (as described above) pdf-as should be run within
+ * an iframe. In case of a signature performed with a local citizen card software or with the
+ * server bku the result has to be provided outside an iframe. To break out of the iframe a
+ * helper jsp (redirect_to_parent) has to be used that redirects the user to the parent
+ * window.
+ */
+ if (Constants.SIGNATURE_DEVICE_BKU.equals(si.connector) || Constants.SIGNATURE_DEVICE_MOC.equals(si.connector)) {
+ HttpSession session = request.getSession();
+ log.debug("Local bku was used therefore pdf-as is supposed to run within an iframe.");
+ log.debug("Putting external application notify url (\"" + query + "\") in session (" + session.getId() + ") for later use.");
+ request.getSession().setAttribute(SessionAttributes.PARENT_WEBAPP_REDIRECT_URL, query);
+ String redirectHelper = response.encodeRedirectURL(request.getContextPath() + "/jsp/redirect_to_parent.jsp");
+ log.debug("Redirecting to " + redirectHelper);
+ response.sendRedirect(redirectHelper);
+ } else {
+ log.debug("Notifying external application by redirecting to \"" + query + "\".");
+ response.sendRedirect(query);
+ }
+
}
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java index 302e8cb..d150f70 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java @@ -96,7 +96,7 @@ public abstract class PdfAS * The current version of the pdf-as library. This version string is logged on every invocation
* of the api or the web application.
*/
- public static final String PDFAS_VERSION = "3.0.9-20090129";
+ public static final String PDFAS_VERSION = "3.0.9-20090203";
/**
* The key of the strict mode setting.
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java b/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java index 6cd5e61..bca5b17 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java @@ -394,6 +394,7 @@ public class SettingsReader implements Serializable logger_.info(" configuration path = \"" + CONFIG_PATH + "\"");
logger_.info(" certstore path = \"" + CERT_PATH + "\"");
logger_.info(" temporary path = \"" + TMP_PATH + "\"");
+ logger_.info(" file.encoding = \"" + System.getProperty("file.encoding") + "\"");
logger_.info(StringUtils.repeat("*", length + 25));
IAIK.addAsProvider();
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUHelper.java index cec8d6f..af155a1 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUHelper.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUHelper.java @@ -110,6 +110,7 @@ public final class BKUHelper */
public static void checkResponseForError(String response_string) throws ConnectorException
{
+ log.debug("Checking response for error: " + response_string);
Pattern erc_p_s = Pattern.compile("<[\\w]*:?ErrorCode>"); //$NON-NLS-1$
Pattern erc_p_e = Pattern.compile("</[\\w]*:?ErrorCode>"); //$NON-NLS-1$
Matcher erc_m_s = erc_p_s.matcher(response_string);
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java index fcfe006..30212eb 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java @@ -547,10 +547,10 @@ public class LocRefDetachedMOCCAConnector implements Connector, LocalConnector { * @return The common part of all id attributes.
*/
protected String parseSigId(String sigIdString) {
- int pos = sigIdString.indexOf("@");
+ String[] parts = sigIdString.split("@");
String result = null;
- if (pos != -1) {
- result = sigIdString.substring(pos+1).trim();
+ if (parts != null && parts.length > 1) {
+ result = parts[1].trim();
}
return result;
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedMOCIdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedMOCIdFormatter.java index c942b73..ae46225 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedMOCIdFormatter.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedMOCIdFormatter.java @@ -16,7 +16,7 @@ import at.knowcenter.wag.egov.egiz.exceptions.SettingsException; */
public class DetachedMOCIdFormatter implements IdFormatter {
- public static String SIG_ID_PREFIX = "etsi-moc-1.0";
+ public static final String SIG_ID_PREFIX = "etsi-moc-1.0";
/**
* Key value in property file
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/ExternAppInformation.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/ExternAppInformation.java index 73f10aa..d00ec61 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/ExternAppInformation.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/ExternAppInformation.java @@ -12,11 +12,17 @@ public class ExternAppInformation implements Serializable { public String invoke_url;
public long pdf_id;
public String session_id;
+ public String invoke_error_url;
public ExternAppInformation(String url, String id, String session_id) {
+ this(url, id, session_id, null);
+ }
+
+ public ExternAppInformation(String url, String id, String session_id, String errorUrl) {
this.invoke_url = url;
this.pdf_id = Long.parseLong(id);
this.session_id = session_id;
+ this.invoke_error_url = errorUrl;
}
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/FormFields.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/FormFields.java index ad480cc..7b8164a 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/FormFields.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/FormFields.java @@ -88,6 +88,8 @@ public abstract class FormFields public static final String FIELD_FILE_LENGTH = "num-bytes";
public static final String FIELD_INVOKE_APP_URL = "invoke-app-url";
+
+ public static final String FIELD_INVOKE_APP_ERROR_URL = "invoke-app-error-url";
public static final String FIELD_SESSION_ID = "session-id";
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/SessionAttributes.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/SessionAttributes.java index f4956be..1a7d90f 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/SessionAttributes.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/SessionAttributes.java @@ -54,4 +54,9 @@ public abstract class SessionAttributes */
public static final String DOWNLOAD_URL_FOR_SIGNED_PDF_DOCUMENT = "java.lang.String:downloadURL";
+ /**
+ * The notification url of an external webapplication.
+ */
+ public static final String PARENT_WEBAPP_REDIRECT_URL = "java.lang.String:parentWebAppRedirectURL";
+
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java index 16352de..f74bd1c 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java @@ -277,7 +277,7 @@ public class DataURLServlet extends HttpServlet // redirect to download.jsp but return the sign-response immediately
if (si.exappinf != null) {
log.debug("Entering external application interface mode. Skipping redirection to download page.");
- SignServletHelper.returnSignResponse(si, response);
+ SignServletHelper.returnSignResponse(si, request, response);
// Not needed due to redirection of returnSignResponse.
// Just to clarify that there must not be any code after returnSignResponse.
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java index 1efc64f..c40f3c6 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java @@ -61,7 +61,7 @@ public class ProvidePDFServlet extends HttpServlet { log.debug("Returning signed pdf to browser.");
// log.debug("Invalidating session.");
// session.invalidate();
- SignServletHelper.returnSignResponse(si, response);
+ SignServletHelper.returnSignResponse(si, request, response);
return;
}
} else {
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java index 589de7c..792a3e1 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java @@ -184,6 +184,7 @@ public class SignServlet extends HttpServlet String pdf_id = (String) request.getParameter(FormFields.FIELD_PDF_ID);
String pdf_length = (String) request.getParameter(FormFields.FIELD_FILE_LENGTH);
String invoke_url = (String) request.getParameter(FormFields.FIELD_INVOKE_APP_URL);
+ String invoke_error_url = (String) request.getParameter(FormFields.FIELD_INVOKE_APP_ERROR_URL);
String session_id = (String) request.getParameter(FormFields.FIELD_SESSION_ID);
String sig_pos_y = (String) request.getParameter(FormFields.FIELD_SIGPOS_Y);
String sig_pos_p = (String) request.getParameter(FormFields.FIELD_SIGPOS_P);
@@ -227,7 +228,7 @@ public class SignServlet extends HttpServlet ud = ud_extern;
- exappinf = new ExternAppInformation(invoke_url, pdf_id, session_id);
+ exappinf = new ExternAppInformation(invoke_url, pdf_id, session_id, invoke_error_url);
}
else
{
diff --git a/src/main/webapp/css/pdfas-styles.css b/src/main/webapp/css/pdfas-styles.css index c82069b..9dfed42 100644 --- a/src/main/webapp/css/pdfas-styles.css +++ b/src/main/webapp/css/pdfas-styles.css @@ -48,6 +48,7 @@ div.pdfassmallverticalspace { div.pdfasnote {
padding: 10px 0px 0px 0px;
margin: 0px 0px 0px 0px;
+ max-width: 700px;
}
.pdfasemphasis {
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>
diff --git a/src/main/webapp/sitemesh/standalone.jsp b/src/main/webapp/sitemesh/standalone.jsp index f87766b..add7185 100644 --- a/src/main/webapp/sitemesh/standalone.jsp +++ b/src/main/webapp/sitemesh/standalone.jsp @@ -12,6 +12,18 @@ <link rel="stylesheet" type="text/css" href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/css/pdfas-styles.css" />
</head>
- <body><decorator:body/></body>
+ <body>
+ <table cellpadding="0" cellspacing="0" border="0" width="100%">
+ <tr>
+ <td align="center" valign="middle">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td><decorator:body/></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
</html>
diff --git a/src/site/changes.xml b/src/site/changes.xml index 347cbae..4ac56fb 100644 --- a/src/site/changes.xml +++ b/src/site/changes.xml @@ -13,6 +13,18 @@ </release>
-->
+ <release version="3.0.9-20090203" date="2009-02-03" description="subsequent release">
+ <action dev="tknall" type="add">Some more log messages (e.g. encoding related issues).</action>
+ <action dev="tknall" type="update">Updating web application (in external invocation mode) enhancing support for being used within an iframe.</action>
+ <action dev="tknall" type="add">
+ Two new (optional) parameters for external invocation mode:
+ locale: defines the locale being used for webapp (e.g. locale=de or locale=de_DE),
+ invoke-app-error-url: can be used to declare a callback url to the calling web application in order to transfer error messages from pdf-as.
+ In case of error pdf-as redirects the user to the error-page-url (if given) providing the error and the cause in url encoded parameters ("error", "cause").
+ </action>
+ <action dev="tknall" type="update">Formatter for mocca signature params enhanced.</action>
+ </release>
+
<release version="3.0.9-20090129" date="2009-01-29" description="BRZ release">
<action dev="wprinz" type="add">Added signatureKeyIdentifier to SignParameters in the API, which allows to override the one specified in the profile (MOA Connector only).</action>
<action dev="wprinz" type="add">Added maven assembly and batch file for BRZ distribution.</action>
@@ -20,7 +32,7 @@ </release>
<release version="3.0.8-20090113" date="2009-01-13" description="subsequent release">
- <action dev="tknall" type="update">Switching to itext-2.1.5-rev3628.</action>
+ <action dev="tknall" type="update">Switching to itext-2.1.5-rev3628. (itext-1.4.x is regarded as deprecated.)</action>
<action dev="gfliess" type="update">itext library: minor adjustments for pdf-as</action>
<action dev="tknall" type="add">Adding new error code (103) for invalid pdfa/1b font configuration.</action>
<action dev="gfliess" type="update">Minor updates for PDF/A support.</action>
|