From 03875a41dd5b065c8ab0c04268ac9371f51a8639 Mon Sep 17 00:00:00 2001 From: tknall Date: Wed, 4 Feb 2009 09:10:02 +0000 Subject: Some more log messages (e.g. encoding related issues). Updating web application (in external invocation mode) enhancing support for being used within an iframe. 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"). Formatter for mocca signature params enhanced. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@323 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- dok/Hinweise-zur-PDF-AS-Konfiguration.pdf | Bin 364228 -> 0 bytes pom.xml | 4 +- .../java/at/gv/egiz/pdfas/utils/ConfigUtils.java | 3 ++ .../egiz/pdfas/web/helper/SignServletHelper.java | 39 +++++++++++++--- .../java/at/knowcenter/wag/egov/egiz/PdfAS.java | 2 +- .../wag/egov/egiz/cfg/SettingsReader.java | 1 + .../egov/egiz/sig/connectors/bku/BKUHelper.java | 1 + .../mocca/LocRefDetachedMOCCAConnector.java | 6 +-- .../egiz/sig/sigid/DetachedMOCIdFormatter.java | 2 +- .../wag/egov/egiz/web/ExternAppInformation.java | 6 +++ .../knowcenter/wag/egov/egiz/web/FormFields.java | 2 + .../wag/egov/egiz/web/SessionAttributes.java | 5 ++ .../wag/egov/egiz/web/servlets/DataURLServlet.java | 2 +- .../egov/egiz/web/servlets/ProvidePDFServlet.java | 2 +- .../wag/egov/egiz/web/servlets/SignServlet.java | 3 +- src/main/webapp/css/pdfas-styles.css | 1 + src/main/webapp/jsp/error.jsp | 44 ++++++++++++++++-- src/main/webapp/jsp/null_request_page.jsp | 51 +++++++++++++++------ src/main/webapp/jsp/redirect_to_parent.jsp | 24 ++++++++++ src/main/webapp/sitemesh/standalone.jsp | 14 +++++- src/site/changes.xml | 14 +++++- 21 files changed, 189 insertions(+), 37 deletions(-) delete mode 100644 dok/Hinweise-zur-PDF-AS-Konfiguration.pdf create mode 100644 src/main/webapp/jsp/redirect_to_parent.jsp diff --git a/dok/Hinweise-zur-PDF-AS-Konfiguration.pdf b/dok/Hinweise-zur-PDF-AS-Konfiguration.pdf deleted file mode 100644 index d6fdd13..0000000 Binary files a/dok/Hinweise-zur-PDF-AS-Konfiguration.pdf and /dev/null differ diff --git a/pom.xml b/pom.xml index de615c5..31bc29c 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ knowcenter pdf-as PDF-AS - 3.0.9-20090129 + 3.0.9-20090203 Amtssignatur fuer elektronische Aktenfuehrung @@ -129,7 +129,7 @@ src/main/assembly/assemble_libraries.xml src/main/assembly/assemble_distribution_ws.xml src/main/assembly/assemble_repository.xml - src/main/assembly/assemble_repository.xml + src/main/assembly/assemble_distribution_brz.xml --> src/main/assembly/assemble_distribution_brz.xml 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(""); //$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); + } + %> @@ -40,8 +74,10 @@ <% } else { out.write(cause); } %> -
- + <% if (!isExternalInvocation && !paramInvok) { %> +
+ + <% } // end if %>
 		<%
 		  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); 
 %>
-
 
 	
 		
@@ -37,10 +39,15 @@
 	
 
 	
-		

-

- <% if (isOnlineMOCCA) { %> -
+ <% if (!isExternalInvocation) { %> +

+

+ <% } // end if %> + + <% if (isServerBKU) { %> + <% if (!isExternalInvocation) { %> +
+ <% } // end if %>
@@ -50,19 +57,33 @@ <% } // end if %>
-
- + <% if (!isExternalInvocation) { %> +
+ + <% } else { // end if %> + + <% } // end if %> + <% } else { %> -
-
+ <% if (isExternalInvocation) { %> +
+ <% } else { %> +
+
+ <% } // end if %>
- " /> + <% if (!isExternalInvocation) { %> + " /> + <% } // end if %>
<% } // end if %> -
- + + <% if (!isExternalInvocation) { %> +
+ + <% } // end if %> + 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 @@ - + + + + + +
+ + + + +
+
+ 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 @@ --> + + Some more log messages (e.g. encoding related issues). + Updating web application (in external invocation mode) enhancing support for being used within an iframe. + + 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"). + + Formatter for mocca signature params enhanced. + + Added signatureKeyIdentifier to SignParameters in the API, which allows to override the one specified in the profile (MOA Connector only). Added maven assembly and batch file for BRZ distribution. @@ -20,7 +32,7 @@ - Switching to itext-2.1.5-rev3628. + Switching to itext-2.1.5-rev3628. (itext-1.4.x is regarded as deprecated.) itext library: minor adjustments for pdf-as Adding new error code (103) for invalid pdfa/1b font configuration. Minor updates for PDF/A support. -- cgit v1.2.3