From f4c61a145d4f9a537c87fe67db36de8c28f2e352 Mon Sep 17 00:00:00 2001 From: tknall Date: Thu, 3 Apr 2008 12:28:41 +0000 Subject: Web application adapted for Maven2 (/webapps -> /src/main/webapps). Recognition of citizen card environment integrated. New style sheets. Web app classes adapted in order to avoid popup blocker of ie7 and to avoid an ITS bku bug. Maven2 repository updated. Eclipse project settings adapted in order to enable Eclipse Web Tools Platform usage. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@256 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .classpath | 18 +-- .project | 6 + .settings/org.eclipse.wst.common.component | 9 +- .../org.eclipse.wst.common.project.facet.core.xml | 5 +- lib-maven_repository/maven2-repository.zip | Bin 8612355 -> 8933488 bytes pom.xml | 23 ++-- src/main/assembly/assemble_repository.xml | 19 +++ .../egiz/pdfas/web/helper/SignServletHelper.java | 5 +- .../at/gv/egiz/pdfas/web/helper/TempDirHelper.java | 3 +- .../wag/egov/egiz/web/SessionAttributes.java | 11 ++ .../wag/egov/egiz/web/servlets/DataURLServlet.java | 14 ++- .../egov/egiz/web/servlets/ProvidePDFServlet.java | 124 +++++++++++-------- .../egiz/web/servlets/VerifyPreviewServlet.java | 38 ++---- .../wag/egov/egiz/web/servlets/VerifyServlet.java | 4 +- src/main/webapp/META-INF/context.xml | 9 ++ src/main/webapp/WEB-INF/decorators.xml | 15 +++ src/main/webapp/WEB-INF/web.xml | 135 +++++++++++++++++++++ .../bku-erkennung/bku-erkennung/bku-erkennung.html | 47 +++++++ .../bku-erkennung/bku-erkennung_empty.html | 11 ++ .../bku-erkennung/bku-erkennung_helper.html | 17 +++ .../webapp/bku-erkennung/bku-erkennung_iframe.html | 57 +++++++++ src/main/webapp/bku-erkennung/css/pngbehavior.htc | 86 +++++++++++++ src/main/webapp/bku-erkennung/img/blank.gif | Bin 0 -> 49 bytes src/main/webapp/bku-erkennung/img/siga1.gif | Bin 0 -> 694 bytes src/main/webapp/bku-erkennung/img/siga1.png | Bin 0 -> 1666 bytes src/main/webapp/bku-erkennung/img/siga1_active.png | Bin 0 -> 1826 bytes src/main/webapp/bku-erkennung/img/siga1_small.gif | Bin 0 -> 1401 bytes src/main/webapp/bku-erkennung/img/sighw.gif | Bin 0 -> 1336 bytes src/main/webapp/bku-erkennung/img/sighw_active.png | Bin 0 -> 1932 bytes src/main/webapp/bku-erkennung/img/sighw_green.gif | Bin 0 -> 2755 bytes src/main/webapp/bku-erkennung/img/sighw_green.png | Bin 0 -> 5444 bytes .../webapp/bku-erkennung/img/sighw_green_bold.png | Bin 0 -> 5546 bytes .../bku-erkennung/img/sighw_green_original.gif | Bin 0 -> 2825 bytes src/main/webapp/bku-erkennung/img/sighw_red.gif | Bin 0 -> 2970 bytes src/main/webapp/bku-erkennung/img/sighw_red.png | Bin 0 -> 5709 bytes .../bku-erkennung/img/sighw_red_original.gif | Bin 0 -> 3032 bytes src/main/webapp/bku-erkennung/img/sighw_yellow.gif | Bin 0 -> 2860 bytes src/main/webapp/bku-erkennung/img/sighw_yellow.png | Bin 0 -> 5664 bytes .../bku-erkennung/img/sighw_yellow_original.gif | Bin 0 -> 2911 bytes src/main/webapp/bku-erkennung/index.html | 14 +++ src/main/webapp/css/pdfas-styles.css | 111 +++++++++++++++++ src/main/webapp/images/signatur-logo_de-100.png | Bin 0 -> 7852 bytes src/main/webapp/images/signatur-logo_de.png | Bin 0 -> 62345 bytes src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp | 61 ++++++++++ src/main/webapp/jsp/dataok.jsp | 24 ++++ src/main/webapp/jsp/download.jsp | 40 ++++++ src/main/webapp/jsp/error.jsp | 48 ++++++++ src/main/webapp/jsp/error_verify.jsp | 48 ++++++++ src/main/webapp/jsp/null_request_page.jsp | 46 +++++++ src/main/webapp/jsp/results.jsp | 78 ++++++++++++ src/main/webapp/jsp/signpreview.jsp | 68 +++++++++++ src/main/webapp/jsp/signupload.jsp | 68 +++++++++++ src/main/webapp/jsp/verifylist.jsp | 73 +++++++++++ src/main/webapp/jsp/verifypreview.jsp | 60 +++++++++ src/main/webapp/jsp/verifyupload.jsp | 38 ++++++ src/main/webapp/parentpage/standalone.jsp | 17 +++ tomcat/pdf-as.xml | 4 +- webapp/THIS_FOLDER_IS_DEPRECATED.txt | 1 + webapp/jsp/null_request_page.jsp | 2 +- work/cfg/config.properties | 4 +- 60 files changed, 1351 insertions(+), 110 deletions(-) create mode 100644 src/main/assembly/assemble_repository.xml create mode 100644 src/main/webapp/META-INF/context.xml create mode 100644 src/main/webapp/WEB-INF/decorators.xml create mode 100644 src/main/webapp/WEB-INF/web.xml create mode 100644 src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung.html create mode 100644 src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_empty.html create mode 100644 src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_helper.html create mode 100644 src/main/webapp/bku-erkennung/bku-erkennung_iframe.html create mode 100644 src/main/webapp/bku-erkennung/css/pngbehavior.htc create mode 100644 src/main/webapp/bku-erkennung/img/blank.gif create mode 100644 src/main/webapp/bku-erkennung/img/siga1.gif create mode 100644 src/main/webapp/bku-erkennung/img/siga1.png create mode 100644 src/main/webapp/bku-erkennung/img/siga1_active.png create mode 100644 src/main/webapp/bku-erkennung/img/siga1_small.gif create mode 100644 src/main/webapp/bku-erkennung/img/sighw.gif create mode 100644 src/main/webapp/bku-erkennung/img/sighw_active.png create mode 100644 src/main/webapp/bku-erkennung/img/sighw_green.gif create mode 100644 src/main/webapp/bku-erkennung/img/sighw_green.png create mode 100644 src/main/webapp/bku-erkennung/img/sighw_green_bold.png create mode 100644 src/main/webapp/bku-erkennung/img/sighw_green_original.gif create mode 100644 src/main/webapp/bku-erkennung/img/sighw_red.gif create mode 100644 src/main/webapp/bku-erkennung/img/sighw_red.png create mode 100644 src/main/webapp/bku-erkennung/img/sighw_red_original.gif create mode 100644 src/main/webapp/bku-erkennung/img/sighw_yellow.gif create mode 100644 src/main/webapp/bku-erkennung/img/sighw_yellow.png create mode 100644 src/main/webapp/bku-erkennung/img/sighw_yellow_original.gif create mode 100644 src/main/webapp/bku-erkennung/index.html create mode 100644 src/main/webapp/css/pdfas-styles.css create mode 100644 src/main/webapp/images/signatur-logo_de-100.png create mode 100644 src/main/webapp/images/signatur-logo_de.png create mode 100644 src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp create mode 100644 src/main/webapp/jsp/dataok.jsp create mode 100644 src/main/webapp/jsp/download.jsp create mode 100644 src/main/webapp/jsp/error.jsp create mode 100644 src/main/webapp/jsp/error_verify.jsp create mode 100644 src/main/webapp/jsp/null_request_page.jsp create mode 100644 src/main/webapp/jsp/results.jsp create mode 100644 src/main/webapp/jsp/signpreview.jsp create mode 100644 src/main/webapp/jsp/signupload.jsp create mode 100644 src/main/webapp/jsp/verifylist.jsp create mode 100644 src/main/webapp/jsp/verifypreview.jsp create mode 100644 src/main/webapp/jsp/verifyupload.jsp create mode 100644 src/main/webapp/parentpage/standalone.jsp create mode 100644 webapp/THIS_FOLDER_IS_DEPRECATED.txt diff --git a/.classpath b/.classpath index 9f31db0..471f82e 100644 --- a/.classpath +++ b/.classpath @@ -1,13 +1,15 @@ - - - - - - - + + + + + + + + + + - diff --git a/.project b/.project index 28557b9..1ec8925 100644 --- a/.project +++ b/.project @@ -20,6 +20,11 @@ + + edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder + + + org.eclipse.wst.validation.validationbuilder @@ -29,6 +34,7 @@ org.eclipse.jdt.core.javanature org.maven.ide.eclipse.maven2Nature + edu.umd.cs.findbugs.plugin.eclipse.findbugsNature org.eclipse.wst.common.project.facet.core.nature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jem.workbench.JavaEMFNature diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index f0b9a57..5b825ae 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -1,8 +1,11 @@ - - - + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index 8b6262d..88f9e67 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,7 +1,8 @@ - + + - + diff --git a/lib-maven_repository/maven2-repository.zip b/lib-maven_repository/maven2-repository.zip index b940a0b..347de5d 100644 Binary files a/lib-maven_repository/maven2-repository.zip and b/lib-maven_repository/maven2-repository.zip differ diff --git a/pom.xml b/pom.xml index 13d8f6e..92dabc9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,12 +4,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - jar + war knowcenter pdf-as PDF-AS - 3.0.4-20080320 + 3.0.4-20080403 Amtssignatur fuer elektronische Aktenfuehrung http://egovlabs.gv.at/projects/pdf-as @@ -76,7 +76,7 @@ - ${artifactId}-${version} + ${artifactId} @@ -98,11 +98,14 @@ maven-assembly-plugin - - src/main/assembly/assemble_distribution_cl.xml + + + src/main/assembly/assemble_repository.xml + @@ -280,14 +283,12 @@ 1.3.02 - - opensymphony sitemesh 2.3 - --> diff --git a/src/main/assembly/assemble_repository.xml b/src/main/assembly/assemble_repository.xml new file mode 100644 index 0000000..cbfe790 --- /dev/null +++ b/src/main/assembly/assemble_repository.xml @@ -0,0 +1,19 @@ + + + + maven2-repository + + zip + + false + + + + + false + / + + + + + 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 46cf1c8..5dbc8b6 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 @@ -23,7 +23,6 @@ import at.gv.egiz.pdfas.impl.output.FileBasedDataSink; import at.gv.egiz.pdfas.web.SignSessionInformation; import at.knowcenter.wag.egov.egiz.PdfASID; import at.knowcenter.wag.egov.egiz.exceptions.PresentableException; -import at.knowcenter.wag.egov.egiz.framework.SignResult; import at.knowcenter.wag.egov.egiz.framework.signators.DetachedSignator_1_0_0; import at.knowcenter.wag.egov.egiz.sig.ConnectorFactory; import at.knowcenter.wag.egov.egiz.sig.connectors.Connector; @@ -45,7 +44,7 @@ public class SignServletHelper */ private static Log log = LogFactory.getLog(SignServletHelper.class); - protected static void dispatch(HttpServletRequest request, HttpServletResponse response, String resource, ServletContext context) throws ServletException, IOException + public static void dispatch(HttpServletRequest request, HttpServletResponse response, String resource, ServletContext context) throws ServletException, IOException { response.setContentType("text/html"); response.setCharacterEncoding("UTF-8"); @@ -142,8 +141,8 @@ public class SignServletHelper signator.finishSign(si.si, si.output); returnSignResponse(si, response); - log.debug("finishSign finished."); //$NON-NLS-1$ + } /** diff --git a/src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java b/src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java index 1b7971c..e3f10ed 100644 --- a/src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java +++ b/src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java @@ -26,7 +26,6 @@ import at.gv.egiz.pdfas.framework.input.TextDataSource; import at.gv.egiz.pdfas.framework.output.DataSink; import at.gv.egiz.pdfas.impl.input.ByteArrayPdfDataSourceImpl; import at.gv.egiz.pdfas.impl.input.FileBased; -import at.gv.egiz.pdfas.impl.input.FileBasedPdfDataSourceImpl; import at.gv.egiz.pdfas.impl.input.FileBasedTextDataSourceImpl; import at.gv.egiz.pdfas.impl.input.TextDataSourceImpl; import at.gv.egiz.pdfas.impl.input.helper.DataSourceHelper; @@ -241,6 +240,8 @@ public class TempDirHelper { ByteArrayDataSink bads = (ByteArrayDataSink)ds; os.write(bads.getByteArray()); + os.flush(); + } os.close(); 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 02b6855..f4956be 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 @@ -43,4 +43,15 @@ public abstract class SessionAttributes *

*/ public static final String ATTRIBUTE_SESSION_INFORMATION = "session_information"; + + /** + * The signed pdf document. + */ + public static final String SIGNED_PDF_DOCUMENT = "at.gv.egiz.pdfas.web.SignSessionInformation:signedPDF"; + + /** + * The download URL for the signed pdf document. + */ + public static final String DOWNLOAD_URL_FOR_SIGNED_PDF_DOCUMENT = "java.lang.String:downloadURL"; + } 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 01e60fa..3c2ba28 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 @@ -16,6 +16,7 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; 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; @@ -40,6 +41,7 @@ import at.knowcenter.wag.egov.egiz.sig.connectors.LocalConnector; import at.knowcenter.wag.egov.egiz.sig.connectors.bku.BKUPostConnection; import at.knowcenter.wag.egov.egiz.web.FormFields; import at.knowcenter.wag.egov.egiz.web.LocalRequest; +import at.knowcenter.wag.egov.egiz.web.SessionAttributes; /** * @author wprinz @@ -162,7 +164,7 @@ public class DataURLServlet extends HttpServlet } else { - log.debug("Recieved a normal response -> storing the response."); //$NON-NLS-1$ + log.debug("Received a normal response -> storing the response."); //$NON-NLS-1$ Properties response_properties = new Properties(); response_properties.setProperty(BKUPostConnection.RESPONSE_STRING_KEY, xml_response); @@ -203,7 +205,15 @@ public class DataURLServlet extends HttpServlet } else { - SignServletHelper.returnSignResponse(si, response); + HttpSession session = request.getSession(true); + log.debug("Putting signed document into session (" + session.getId() + ")."); + session.setAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT, si); + session.setAttribute(SessionAttributes.DOWNLOAD_URL_FOR_SIGNED_PDF_DOCUMENT, response.encodeRedirectURL("/pdf-as/ProvidePDF")); + String redirectURL = response.encodeRedirectURL("/pdf-as/jsp/download.jsp"); + log.debug("Redirecting to " + redirectURL + "."); + response.sendRedirect(redirectURL); + return; +// SignServletHelper.returnSignResponse(si, response); } } } 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 cd4cf43..6d486a5 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 @@ -8,66 +8,94 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Set; +import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; 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.web.SignSessionInformation; +import at.gv.egiz.pdfas.web.helper.SignServletHelper; +import at.knowcenter.wag.egov.egiz.exceptions.PresentableException; import at.knowcenter.wag.egov.egiz.web.FormFields; import at.knowcenter.wag.egov.egiz.web.PDFContainer; +import at.knowcenter.wag.egov.egiz.web.SessionAttributes; public class ProvidePDFServlet extends HttpServlet { - /** - * SVUID. - */ - private static final long serialVersionUID = 1L; - - /** - * The log. - */ - private static Log log = LogFactory.getLog(ProvidePDFServlet.class); - - public static Set signedDocuments = Collections.synchronizedSet(new HashSet()); - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException - { - - long pdfId = Long.parseLong(request.getParameter(FormFields.FIELD_PDF_ID)); - - Iterator it = signedDocuments.iterator(); - - while(it.hasNext()) { - PDFContainer current = (PDFContainer) it.next(); - if(current.id == pdfId) { - try { - byte[] pdf = current.pdf; - - response.setContentType("application/pdf"); - response.setContentLength(pdf.length); - - InputStream is = new ByteArrayInputStream(pdf); - final int bufferSize = 1024; - byte[] buffer = new byte[bufferSize]; - int len = -1; - while ((len = is.read(buffer)) != -1) { - response.getOutputStream().write(buffer, 0, len); - } - response.getOutputStream().flush(); - signedDocuments.remove(current); - } catch(IOException e) { - log.warn("IO excepton while providing pdf document: " + e.getMessage()); - } + /** + * SVUID. + */ + private static final long serialVersionUID = 1L; + + /** + * The log. + */ + private static Log log = LogFactory.getLog(ProvidePDFServlet.class); + + public static Set signedDocuments = Collections.synchronizedSet(new HashSet()); + + public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + String pdfIdString = request.getParameter(FormFields.FIELD_PDF_ID); + + if (pdfIdString == null) { + HttpSession session = request.getSession(true); + log.debug("No " + FormFields.FIELD_PDF_ID + " provided. Trying to retrieve PDF from session (" + session.getId() + ")."); + SignSessionInformation si = (SignSessionInformation) session.getAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); + if (si == null) { + log.warn("Unable to find signed pdf in session (" + session.getId() + ")."); + SignServlet.prepareDispatchToErrorPage(new PresentableException(600, "Das signierte Dokument konnte nicht gefunden werden."), request); + response.setContentType("text/html"); + response.setCharacterEncoding("UTF-8"); + RequestDispatcher disp = super.getServletContext().getRequestDispatcher("/jsp/error.jsp"); + disp.forward(request, response); + return; + } else { + log.debug("Signed pdf found. Removing from session."); + session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); + log.debug("Returning signed pdf to browser."); + SignServletHelper.returnSignResponse(si, response); + return; + } + } else { + long pdfId = Long.parseLong(pdfIdString); + + Iterator it = signedDocuments.iterator(); + + while (it.hasNext()) { + PDFContainer current = (PDFContainer) it.next(); + if (current.id == pdfId) { + try { + byte[] pdf = current.pdf; + + response.setContentType("application/pdf"); + response.setContentLength(pdf.length); + + InputStream is = new ByteArrayInputStream(pdf); + final int bufferSize = 1024; + byte[] buffer = new byte[bufferSize]; + int len = -1; + while ((len = is.read(buffer)) != -1) { + response.getOutputStream().write(buffer, 0, len); + } + response.getOutputStream().flush(); + signedDocuments.remove(current); + } catch (IOException e) { + log.warn("IO excepton while providing pdf document: " + e.getMessage()); + } + } + } } - } - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException - { - doPost(request, response); - } - + + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + doPost(request, response); + } + } diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java index 732e6cc..571a8e1 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java @@ -315,14 +315,14 @@ public class VerifyPreviewServlet extends HttpServlet } writer.println(" "); - writer.println(" " + caption + ":"); + writer.println(" " + caption + ":"); writer.println(" "); value = value.replaceAll("\\s", " "); value = value.replaceAll("\\\"", "\\\""); String input_key = name_prefix + key; - writer.println(" "); + writer.println(" "); writer.println(" "); writer.println(" "); @@ -337,25 +337,10 @@ public class VerifyPreviewServlet extends HttpServlet StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); - String title = "alte PDF-AS Signatur"; - try - { - PdfASID kz = signature_object.getKZ(); - if (kz != null) - { - title = kz.toString(); - } - } - catch (InvalidIDException e) - { - e.printStackTrace(); - } - writer.println("
Signatur: " + title + "
"); - writer.println(""); + writer.println("
"); // just render useful information - String[] rkeys = { SignatureTypes.SIG_DATE, SignatureTypes.SIG_ISSUER, - SignatureTypes.SIG_NUMBER, SignatureTypes.SIG_KZ}; // SignatureTypes.REQUIRED_SIG_KEYS; + String[] rkeys = { SignatureTypes.SIG_NAME, SignatureTypes.SIG_DATE, SignatureTypes.SIG_ISSUER, SignatureTypes.SIG_NUMBER}; // SignatureTypes.REQUIRED_SIG_KEYS; for (int key_idx = 0; key_idx < rkeys.length; key_idx++) { @@ -363,15 +348,18 @@ public class VerifyPreviewServlet extends HttpServlet SignatureEntry entry = signature_object.getSigEntry(key); String caption = entry.getCaption(); String value = entry.getValue(); - - if (SignatureTypes.SIG_KZ.equals(key) && value == null) - { - continue; + if (caption == null || value == null) { + continue; } +// if (SignatureTypes.SIG_KZ.equals(key) && value == null) +// { +// continue; +// } + writer.println(" "); - writer.println(" "); - writer.println(" "); + writer.println("
" + caption + ":"); + writer.println(" " + caption + ":"); value = value.replaceAll("\\s", " "); value = value.replaceAll("\\\"", "\\\""); diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java index eb07828..001b8b3 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java @@ -170,13 +170,13 @@ public class VerifyServlet extends HttpServlet { request.setAttribute("error", "Fehler beim Upload der Daten"); request.setAttribute("cause", "Beim Upload der Daten ist ein Fehler aufgetreten."); - dispatch(request, response, "/jsp/error.jsp"); + dispatch(request, response, "/jsp/error_verify.jsp"); } catch (PresentableException e) { e.printStackTrace(); SignServlet.prepareDispatchToErrorPage(e, request); - dispatch(request, response, "/jsp/error.jsp"); + dispatch(request, response, "/jsp/error_verify.jsp"); } } diff --git a/src/main/webapp/META-INF/context.xml b/src/main/webapp/META-INF/context.xml new file mode 100644 index 0000000..0b4f656 --- /dev/null +++ b/src/main/webapp/META-INF/context.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/src/main/webapp/WEB-INF/decorators.xml b/src/main/webapp/WEB-INF/decorators.xml new file mode 100644 index 0000000..431f684 --- /dev/null +++ b/src/main/webapp/WEB-INF/decorators.xml @@ -0,0 +1,15 @@ + + + + /bku-erkennung/* + /css/* + /img/* + *.pdf + /*.pdf + + + + /* + + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..f9903a6 --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,135 @@ + + + + + EGIZ PDF-AS + + PDF-AS + + + + The working directory of PDF-AS. + Points to a directory on the local file system where templates, config files, certificates etc. are found. + If empty, the base of the web application will be chosen. + + + override this in your context file (pdf-as.xml) + + + + sitemesh + com.opensymphony.module.sitemesh.filter.PageFilter + + + + sitemesh + /* + + + + at.knowcenter.wag.egov.egiz.web.PdfASServletContextListener + + + + Sign + at.knowcenter.wag.egov.egiz.web.servlets.SignServlet + + + + ProvidePDF + at.knowcenter.wag.egov.egiz.web.servlets.ProvidePDFServlet + + + + SignPreview + at.knowcenter.wag.egov.egiz.web.servlets.SignPreviewServlet + + + + RetrieveSignatureData + at.knowcenter.wag.egov.egiz.web.servlets.RetrieveSignatureDataServlet + + + + DataURL + at.knowcenter.wag.egov.egiz.web.servlets.DataURLServlet + + + + Verify + at.knowcenter.wag.egov.egiz.web.servlets.VerifyServlet + + + + VerifyPreview + at.knowcenter.wag.egov.egiz.web.servlets.VerifyPreviewServlet + + + + AsynchronousDataResponder + at.knowcenter.wag.egov.egiz.web.AsynchronousDataResponder + + + + AsynchronousRedirectResponder + at.knowcenter.wag.egov.egiz.web.AsynchronousRedirectResponder + + + + + Sign + /Sign + + + + ProvidePDF + /ProvidePDF + + + + SignPreview + /SignPreview + + + + RetrieveSignatureData + /RetrieveSignatureData + + + + DataURL + /DataURL + + + + Verify + /Verify + + + + VerifyPreview + /VerifyPreview + + + + AsynchronousDataResponder + /AsynchronousDataResponder + + + + AsynchronousRedirectResponder + /AsynchronousRedirectResponder + + + + 30 + + + + jsp/signupload.jsp + + + \ No newline at end of file diff --git a/src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung.html b/src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung.html new file mode 100644 index 0000000..d3bb009 --- /dev/null +++ b/src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung.html @@ -0,0 +1,47 @@ + + + + + BKU Test + + + + + + + + + diff --git a/src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_empty.html b/src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_empty.html new file mode 100644 index 0000000..d6d1a1a --- /dev/null +++ b/src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_empty.html @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_helper.html b/src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_helper.html new file mode 100644 index 0000000..7d6aba9 --- /dev/null +++ b/src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_helper.html @@ -0,0 +1,17 @@ + + + + + BKU Test Helper + + + + + + + + diff --git a/src/main/webapp/bku-erkennung/bku-erkennung_iframe.html b/src/main/webapp/bku-erkennung/bku-erkennung_iframe.html new file mode 100644 index 0000000..94bcdc7 --- /dev/null +++ b/src/main/webapp/bku-erkennung/bku-erkennung_iframe.html @@ -0,0 +1,57 @@ + + + + + BKU Test + + + + + + status + + + + + + + diff --git a/src/main/webapp/bku-erkennung/css/pngbehavior.htc b/src/main/webapp/bku-erkennung/css/pngbehavior.htc new file mode 100644 index 0000000..ba171c6 --- /dev/null +++ b/src/main/webapp/bku-erkennung/css/pngbehavior.htc @@ -0,0 +1,86 @@ + + + + + + diff --git a/src/main/webapp/bku-erkennung/img/blank.gif b/src/main/webapp/bku-erkennung/img/blank.gif new file mode 100644 index 0000000..75b945d Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/blank.gif differ diff --git a/src/main/webapp/bku-erkennung/img/siga1.gif b/src/main/webapp/bku-erkennung/img/siga1.gif new file mode 100644 index 0000000..8ff0c6b Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/siga1.gif differ diff --git a/src/main/webapp/bku-erkennung/img/siga1.png b/src/main/webapp/bku-erkennung/img/siga1.png new file mode 100644 index 0000000..4cd7c4e Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/siga1.png differ diff --git a/src/main/webapp/bku-erkennung/img/siga1_active.png b/src/main/webapp/bku-erkennung/img/siga1_active.png new file mode 100644 index 0000000..97a821d Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/siga1_active.png differ diff --git a/src/main/webapp/bku-erkennung/img/siga1_small.gif b/src/main/webapp/bku-erkennung/img/siga1_small.gif new file mode 100644 index 0000000..04804ea Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/siga1_small.gif differ diff --git a/src/main/webapp/bku-erkennung/img/sighw.gif b/src/main/webapp/bku-erkennung/img/sighw.gif new file mode 100644 index 0000000..d397253 Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw.gif differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_active.png b/src/main/webapp/bku-erkennung/img/sighw_active.png new file mode 100644 index 0000000..62a669b Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_active.png differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_green.gif b/src/main/webapp/bku-erkennung/img/sighw_green.gif new file mode 100644 index 0000000..cbef10f Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_green.gif differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_green.png b/src/main/webapp/bku-erkennung/img/sighw_green.png new file mode 100644 index 0000000..9d4349e Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_green.png differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_green_bold.png b/src/main/webapp/bku-erkennung/img/sighw_green_bold.png new file mode 100644 index 0000000..62422ed Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_green_bold.png differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_green_original.gif b/src/main/webapp/bku-erkennung/img/sighw_green_original.gif new file mode 100644 index 0000000..0f967c1 Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_green_original.gif differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_red.gif b/src/main/webapp/bku-erkennung/img/sighw_red.gif new file mode 100644 index 0000000..9eba9e2 Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_red.gif differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_red.png b/src/main/webapp/bku-erkennung/img/sighw_red.png new file mode 100644 index 0000000..7ffd0b6 Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_red.png differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_red_original.gif b/src/main/webapp/bku-erkennung/img/sighw_red_original.gif new file mode 100644 index 0000000..8079312 Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_red_original.gif differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_yellow.gif b/src/main/webapp/bku-erkennung/img/sighw_yellow.gif new file mode 100644 index 0000000..9a95fad Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_yellow.gif differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_yellow.png b/src/main/webapp/bku-erkennung/img/sighw_yellow.png new file mode 100644 index 0000000..d27acbf Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_yellow.png differ diff --git a/src/main/webapp/bku-erkennung/img/sighw_yellow_original.gif b/src/main/webapp/bku-erkennung/img/sighw_yellow_original.gif new file mode 100644 index 0000000..5f0aad2 Binary files /dev/null and b/src/main/webapp/bku-erkennung/img/sighw_yellow_original.gif differ diff --git a/src/main/webapp/bku-erkennung/index.html b/src/main/webapp/bku-erkennung/index.html new file mode 100644 index 0000000..436061b --- /dev/null +++ b/src/main/webapp/bku-erkennung/index.html @@ -0,0 +1,14 @@ + + + + + BKU-Erkennung + + + +

Erkennung laufender BKU-Software

+ + + + + diff --git a/src/main/webapp/css/pdfas-styles.css b/src/main/webapp/css/pdfas-styles.css new file mode 100644 index 0000000..7803827 --- /dev/null +++ b/src/main/webapp/css/pdfas-styles.css @@ -0,0 +1,111 @@ +table.pdfassignature { + background-color: #F5F5F0; + font-size: 1em; + border: 1px solid black; + border-collapse: collapse; + table-layout: auto; + width: 650px; +} + +table.pdfassignature td.pdfaslabel { + font-family: Helvetica, Times; + text-align: center; + border: 1px solid black; + border-collapse: collapse; + min-width: 100px; + /* word-spacing: nowrap; */ +} + +table#pdfasupperformtable { + margin-top: 10px; +} + +table.pdfassignature td.pdfasvalue { + font-family: monospace; + border: 1px solid black; + border-collapse: collapse; + text-align: left; + font-size: 1.2em; +} + +div.pdfasnobreak { + float: left; + white-space: nowrap; +} + +table.pdfassignature td.pdfasvalue input { + font-family: monospace; +} + +div.pdfasverticalspace { + padding: 20px 0px 0px 0px; +} + +div.pdfassmallverticalspace { + padding: 10px 0px 0px 0px; +} + +div.pdfasnote { + padding: 10px 0px 0px 0px; + margin: 0px 0px 0px 0px; +} + +pre.pdfasnt { + font: 1em, courier new, courier, monospace; + border: 1px solid black; + text-align: left; + padding: 5px; + height: 40ex; + width: 640px; + overflow: auto; +} + +a.pdfasbacklink { + padding: 0px 0px 0px 0px; + margin: 20px 0px 10px 0px; +} + +.pdfaspreviewfield { + font: 1em, courier new, courier, monospace; + width: 94%; + margin: 0px 0px 0px 0px; +} + +table.pdfaslisttable { + border-style: none; + border-collapse: collapse; + text-align: left; + font-size: 1em; + width: 100%; +} + +.pdfaslisttablecontainer { + border: 1px solid black; + padding: 5px 5px 5px 5px; + margin: 0px 0px 15px 0px; + float: left; + width: 98%; +} + +table.pdfaslisttable td.pdfasvalue { + width: 90%; +} + +table.pdfaslisttable td.pdfascaption { + width: 10%; + vertical-align: top; + padding-right: 10px; + white-space: nowrap; +} + +.pdfasok { + background-color: #bdff7b; +} + +.pdfasnok { + background-color: #f66; +} + +fieldset.pdfasresultfieldset { + padding: 5px 5px 5px 5px; +} diff --git a/src/main/webapp/images/signatur-logo_de-100.png b/src/main/webapp/images/signatur-logo_de-100.png new file mode 100644 index 0000000..d7ff84d Binary files /dev/null and b/src/main/webapp/images/signatur-logo_de-100.png differ diff --git a/src/main/webapp/images/signatur-logo_de.png b/src/main/webapp/images/signatur-logo_de.png new file mode 100644 index 0000000..4307f6a Binary files /dev/null and b/src/main/webapp/images/signatur-logo_de.png differ diff --git a/src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp b/src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp new file mode 100644 index 0000000..3264093 --- /dev/null +++ b/src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp @@ -0,0 +1,61 @@ +<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage=""%> + +<%@ page import="org.apache.commons.lang.time.DateFormatUtils" %> +<%@ page import="java.util.Date" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Signaturwert +
Aqs3vMeF81wm/UJjIcLOzUs9
+
dxTBzhi2RC8avQyMAmc3v
+
WEj9HT1DI3iish4smRr
+
Signatur-LogoUnterzeichner
Datum/Zeit-UTC<%= DateFormatUtils.formatUTC(new Date(), "yyyy-MM-dd'T'HH:mm:ss'Z'", request.getLocale()) %>
Aussteller-Zertifikat +
CN=Ausstellername,
+
O=Ausstellerorganisation,
+
C=AT
+
Serien-Nr.123456
Methode +
urn:pdfsigfilter:
+
bka.gv.at:
+
text:v1.1.0
+
Parameter +
etsi-bka-1.0@1234567890-123456789@
+
12345-1234-
+
0-
+
12345-
+
12345
Prüfinformation + Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: +
diff --git a/src/main/webapp/jsp/dataok.jsp b/src/main/webapp/jsp/dataok.jsp new file mode 100644 index 0000000..7fc1b96 --- /dev/null +++ b/src/main/webapp/jsp/dataok.jsp @@ -0,0 +1,24 @@ + + + +PDF-AS Amtssignaturen + + + +
+

PDF-AS Amtssignaturen

+
+
Datenänderung
+ +

+Die Daten wurden erfolgreich übernommen. +

+ +
+<% + String btlurl = (String)request.getAttribute("btlurl"); +%> +zurück zur Liste +
+ + \ No newline at end of file diff --git a/src/main/webapp/jsp/download.jsp b/src/main/webapp/jsp/download.jsp new file mode 100644 index 0000000..62a5417 --- /dev/null +++ b/src/main/webapp/jsp/download.jsp @@ -0,0 +1,40 @@ +<%@ page contentType="text/html; charset=UTF-8"%> + +<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %> + +<% + String downloadURL = (String) session.getAttribute(SessionAttributes.DOWNLOAD_URL_FOR_SIGNED_PDF_DOCUMENT); +%> + + + + PDF-Signaturen Lokale Verbindung + + + + +

PDF-Signaturen

+

Dokument Signatur erstellen

+
Der Signatur-Vorgang ist abgeschlossen. Das signierte Dokument kann nun heruntergeladen werden.
Hinweis: Der Download ist nur einmalig möglich. Das Dokument wird nicht am Server gespeichert.
+
+
+ +
+
+ zurück + + + diff --git a/src/main/webapp/jsp/error.jsp b/src/main/webapp/jsp/error.jsp new file mode 100644 index 0000000..48a7f50 --- /dev/null +++ b/src/main/webapp/jsp/error.jsp @@ -0,0 +1,48 @@ +<%@ page isErrorPage="true" %> +<%@ 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="java.io.*" %> + + + + + + PDF-Signaturen Resultat + + + +<% + PresentableException pe = (PresentableException)request.getAttribute("PresentableException"); + if (exception != null && exception instanceof PresentableException) + { + pe = (PresentableException)exception; + SignServlet.prepareDispatchToErrorPage(pe, request); + } + + String error = (request.getAttribute("error") == null ? "" : request.getAttribute("error").toString()); + String cause = (request.getAttribute("cause") == null ? "" : request.getAttribute("cause").toString()); +%> + + +

PDF-Signaturen

+

Ein Fehler ist aufgetreten

+
<%= error %>
+
Ursache: <%= cause %>
+
+ zurück +
+		<%
+		  if (pe != null) {
+		    StringWriter sw = new StringWriter();
+		    PrintWriter pw = new PrintWriter(sw);
+		    pe.printStackTrace(pw);
+		    sw.close();
+		    pw.close();
+		    out.print(sw);
+		  }
+		%>
+		
+ + + diff --git a/src/main/webapp/jsp/error_verify.jsp b/src/main/webapp/jsp/error_verify.jsp new file mode 100644 index 0000000..3e8421d --- /dev/null +++ b/src/main/webapp/jsp/error_verify.jsp @@ -0,0 +1,48 @@ +<%@ page isErrorPage="true" %> +<%@ 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="java.io.*" %> + + + + + + PDF-Signaturen Resultat + + + +<% + PresentableException pe = (PresentableException)request.getAttribute("PresentableException"); + if (exception != null && exception instanceof PresentableException) + { + pe = (PresentableException)exception; + SignServlet.prepareDispatchToErrorPage(pe, request); + } + + String error = (request.getAttribute("error") == null ? "" : request.getAttribute("error").toString()); + String cause = (request.getAttribute("cause") == null ? "" : request.getAttribute("cause").toString()); +%> + + +

PDF-Signaturen

+

Ein Fehler ist aufgetreten

+
<%= error %>
+
Ursache: <%= cause %>
+
+ zurück +
+		<%
+		  if (pe != null) {
+		    StringWriter sw = new StringWriter();
+		    PrintWriter pw = new PrintWriter(sw);
+		    pe.printStackTrace(pw);
+		    sw.close();
+		    pw.close();
+		    out.print(sw);
+		  }
+		%>
+		
+ + + diff --git a/src/main/webapp/jsp/null_request_page.jsp b/src/main/webapp/jsp/null_request_page.jsp new file mode 100644 index 0000000..89df7cf --- /dev/null +++ b/src/main/webapp/jsp/null_request_page.jsp @@ -0,0 +1,46 @@ +<%@ page contentType="text/html; charset=UTF-8"%> +<% + String local_request_url = (String)request.getAttribute("local_request_url"); + String data_url = (String)request.getAttribute("data_url"); +%> + + + + + PDF-Signaturen Lokale Verbindung + + + + +

PDF-Signaturen

+

Dokument Signatur erstellen

+
Die Verbindung zu Ihrer Bürgerkartenumgebung wird hergestellt...
+
+
+ + + +
+
+ zurück + + + + diff --git a/src/main/webapp/jsp/results.jsp b/src/main/webapp/jsp/results.jsp new file mode 100644 index 0000000..990e33e --- /dev/null +++ b/src/main/webapp/jsp/results.jsp @@ -0,0 +1,78 @@ +<%@ page contentType="text/html; charset=UTF-8" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="at.knowcenter.wag.egov.egiz.sig.SignatureResponse" %> + +<% + List results = (List) request.getAttribute("results"); + Object bb = request.getAttribute("backbutton"); + String btlurl = (String)request.getAttribute("btlurl"); + boolean backbutton = true; + if (bb != null && bb.equals("false")) { + backbutton = false; + } +%> + + + + PDF-Signaturen + + +

PDF-Signaturen

+

Prüfergebnis

+ <% + Iterator resit = results.iterator(); + while (resit.hasNext()) { + SignatureResponse result = (SignatureResponse) resit.next(); + %> + +
+
+ Signatur-Check +
"><%= result.getSignatureCheckInfo() %>
+
+ +
+
+ Zertifikat + + + + + <% + List public_properties = result.getPublicProperties(); + Iterator propit = public_properties.iterator(); + while (propit.hasNext()) { + String public_property = (String) propit.next(); + %> + + <% + } + %> + +
Signator:<%= result.getX509SubjectName() %>
Aussteller:<%= result.getX509IssuerName() %>
Seriennummer:<%= result.getX509SerialNumber() %>
Eigenschaft:<%= public_property %>
Zertifikat:"><%= result.getCertificateCheckInfo() %>
+
+ +
+
+ Manifest-Check +
"><%= result.getSignatureManifestCheckInfo() %>
+
+ + <% + if (resit.hasNext()) { + %> +
+ <% + } + } + %> +
+ <% if (backbutton) { %> + zurück + <% } %> + <% if (btlurl != null) { %> + zurück zur Liste + <% } %> + + diff --git a/src/main/webapp/jsp/signpreview.jsp b/src/main/webapp/jsp/signpreview.jsp new file mode 100644 index 0000000..a1e6349 --- /dev/null +++ b/src/main/webapp/jsp/signpreview.jsp @@ -0,0 +1,68 @@ +<%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %> +<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %> +<%@ page import="at.knowcenter.wag.egov.egiz.sig.SignatureData" %> +<%@ page import="at.gv.egiz.pdfas.web.SignSessionInformation" %> +<%@ page import="at.gv.egiz.pdfas.impl.input.TextDataSourceImpl"%> +<%@page import="org.apache.commons.lang.StringEscapeUtils"%> + +<% + SignSessionInformation si = (SignSessionInformation) session.getAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION); + + String submit_url = (String)request.getAttribute("submit_url"); + + String signature_data_url = (String)request.getAttribute("signature_data_url"); + + String document_text = null; + if (si.mode.equals(FormFields.VALUE_MODE_TEXTUAL)) { + SignatureData data = si.si.getSignatureData(); + TextDataSourceImpl tds = (TextDataSourceImpl)data.getDataSource(); + document_text = StringEscapeUtils.escapeHtml(tds.getText()); + } +%> + + + + + + PDF-Signaturen Vorschau + + + +

PDF-Signaturen

+

Vorschau: Dokument Signieren

+ <% + if (si.mode.equals(FormFields.VALUE_MODE_TEXTUAL)) { + %> +
+
<%= document_text != null ? document_text : "" %>
+
+ + + +
+ +
+ <% + } else { + %> +
+
+ +
+
+
+ + + +
+
+ +
+ <% + } + %> +
+ zurück + + + diff --git a/src/main/webapp/jsp/signupload.jsp b/src/main/webapp/jsp/signupload.jsp new file mode 100644 index 0000000..ceabf9a --- /dev/null +++ b/src/main/webapp/jsp/signupload.jsp @@ -0,0 +1,68 @@ +<%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %> +<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %> + + + + + PDF-Signaturen + <% session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); %> + + +

PDF-Signaturen

+

Dokument Signatur erstellen

+
Bitte wählen Sie die zu signierende PDF-Datei. Diese wird mit Ihrer Bürgerkarte signiert.
+
+ + + + + + + + + + + + + +
+ + +
+ +
+ + + + + +
+ + + +
Hinweis: Das Erscheinungsbild der Signaturmarke kann abhängig vom Signatur Typ, vom Signatur Modus, von der verwendeten Bürgerkarte, sowie von der verwendeten Bürgerkartenumgebung variieren.
+
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/src/main/webapp/jsp/verifylist.jsp b/src/main/webapp/jsp/verifylist.jsp new file mode 100644 index 0000000..22a2a4e --- /dev/null +++ b/src/main/webapp/jsp/verifylist.jsp @@ -0,0 +1,73 @@ +<%@ page contentType="text/html; charset=UTF-8" %> +<%@ page import="java.util.List" %> +<%@ page errorPage="error_verify.jsp" %> +<%@ page import="at.knowcenter.wag.egov.egiz.pdf.SignatureHolder" %> +<%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %> +<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %> +<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.VerifyPreviewServlet" %> +<%@ page import="at.gv.egiz.pdfas.web.VerifySessionInformation" %> +<%@ page import="at.gv.egiz.pdfas.web.helper.SessionHelper"%> +<% + + VerifySessionInformation si = (VerifySessionInformation) SessionHelper.getSession(request); + + List signature_holders = si.signature_holders; + +%> + + + + + PDF-Signaturen + + +

PDF-Signaturen

+ <% + if (signature_holders.size() > 1) { + %> +

Dokument Signaturen prüfen

+ <% } else { %> +

Dokument Signatur prüfen

+ <% + } + %> + <% + for (int i = 0; i < signature_holders.size(); i++) { + SignatureHolder holder = (SignatureHolder) signature_holders.get(i); + %> +
+
+ <%= VerifyPreviewServlet.renderRequiredKeysText(holder.getSignatureObject()) %> +
" + accept-charset="UTF-8" + method="get" + style="float:left;"> + + + +
+
" + accept-charset="UTF-8" + method="get" + style="float:left;"> + + + +
+
+ <% + } + %> +
+
+
" + accept-charset="UTF-8" + method="get"> + + + +
+
+ zurück + + diff --git a/src/main/webapp/jsp/verifypreview.jsp b/src/main/webapp/jsp/verifypreview.jsp new file mode 100644 index 0000000..975b5ce --- /dev/null +++ b/src/main/webapp/jsp/verifypreview.jsp @@ -0,0 +1,60 @@ +<%@ page contentType="text/html; charset=UTF-8" %> +<%@ page errorPage="error_verify.jsp" %> +<%@ page import="java.util.List" %> +<%@ page import="at.knowcenter.wag.egov.egiz.pdf.SignatureHolder" %> +<%@ page import="at.knowcenter.wag.egov.egiz.pdf.TextualSignatureHolder" %> +<%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %> +<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %> +<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.VerifyPreviewServlet" %> +<%@ page import="at.gv.egiz.pdfas.web.VerifySessionInformation" %> +<%@ page import="at.gv.egiz.pdfas.web.helper.SessionHelper"%> +<% + String btlurl = (String)request.getAttribute("btlurl"); + + VerifySessionInformation si = (VerifySessionInformation) SessionHelper.getSession(request); + + List signature_holders = si.signature_holders; + Integer ver_wh = (Integer) request.getAttribute(FormFields.FIELD_VERIFY_WHICH); + int verify_which = ver_wh.intValue(); + SignatureHolder signature_holder = (SignatureHolder) signature_holders.get(verify_which); +%> + + + + PDF-Signaturen + + + +

PDF-Signaturen

+

Vorschau: Dokument prüfen

+
" + name="submitform" + enctype="multipart/form-data" + accept-charset="UTF-8" + method="post"> + +
+
+ + <%= VerifyPreviewServlet.renderRequiredKeys(signature_holder.getSignatureObject(), "", false) %> +
+ + + +
+
+zurück +zurück zur Liste + + + diff --git a/src/main/webapp/jsp/verifyupload.jsp b/src/main/webapp/jsp/verifyupload.jsp new file mode 100644 index 0000000..fcbbc8d --- /dev/null +++ b/src/main/webapp/jsp/verifyupload.jsp @@ -0,0 +1,38 @@ +<%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %> +<%@ page contentType="text/html; charset=UTF-8" %> + + + + PDF-Signaturen + + +

PDF-Signaturen

+

Dokument Signatur prüfen

+
Hier bitte den vollständigen Dokumenttext samt Signaturblock eingeben.
+
+ + + + + + + + + + +
<%= FormFields.generateConnectorSelectBox() %>
textuell
+ +
+ + + +
+ + + + +
+
+zurück + + \ No newline at end of file diff --git a/src/main/webapp/parentpage/standalone.jsp b/src/main/webapp/parentpage/standalone.jsp new file mode 100644 index 0000000..716ab00 --- /dev/null +++ b/src/main/webapp/parentpage/standalone.jsp @@ -0,0 +1,17 @@ + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%> + + +<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%> +<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %> + + + + + + + + + + + diff --git a/tomcat/pdf-as.xml b/tomcat/pdf-as.xml index a4dde98..5b4429c 100644 --- a/tomcat/pdf-as.xml +++ b/tomcat/pdf-as.xml @@ -1,5 +1,5 @@ - + - + diff --git a/webapp/THIS_FOLDER_IS_DEPRECATED.txt b/webapp/THIS_FOLDER_IS_DEPRECATED.txt new file mode 100644 index 0000000..e2f7c5a --- /dev/null +++ b/webapp/THIS_FOLDER_IS_DEPRECATED.txt @@ -0,0 +1 @@ +This folder is regarded as deprecated. Use src/main/webapp instead. \ No newline at end of file diff --git a/webapp/jsp/null_request_page.jsp b/webapp/jsp/null_request_page.jsp index 3299b18..c6786d7 100644 --- a/webapp/jsp/null_request_page.jsp +++ b/webapp/jsp/null_request_page.jsp @@ -34,7 +34,7 @@ - + diff --git a/work/cfg/config.properties b/work/cfg/config.properties index 8affab7..dee2676 100644 --- a/work/cfg/config.properties +++ b/work/cfg/config.properties @@ -124,8 +124,8 @@ moa.sign.request.base64=./templates/default.moa.sign.enveloping.xml moa.sign.request.detached=./templates/default.moa.sign.detached.xml # MOA Verifying -moa.verify.url=http://localhost:8080/moa-spss/services/SignatureVerification -moa.verify.TrustProfileID=NEEDS_TO_BE_SET +moa.verify.url=http://localhost:38080/moa-spss/services/SignatureVerification +moa.verify.TrustProfileID=SignaturPruefTool # default moa enveloping verify template files moa.verify.request.base64=./templates/default.moa.verify.request.enveloping.xml -- cgit v1.2.3