aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2008-04-03 12:28:41 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2008-04-03 12:28:41 +0000
commitf4c61a145d4f9a537c87fe67db36de8c28f2e352 (patch)
tree51e6b51375b1c19bf2a2ce332dd254fc5fddc3dd
parent861c81934a6596f6ec001248fc8f16476b816d2f (diff)
downloadpdf-as-3-f4c61a145d4f9a537c87fe67db36de8c28f2e352.tar.gz
pdf-as-3-f4c61a145d4f9a537c87fe67db36de8c28f2e352.tar.bz2
pdf-as-3-f4c61a145d4f9a537c87fe67db36de8c28f2e352.zip
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
-rw-r--r--.classpath18
-rw-r--r--.project6
-rw-r--r--.settings/org.eclipse.wst.common.component9
-rw-r--r--.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--lib-maven_repository/maven2-repository.zipbin8612355 -> 8933488 bytes
-rw-r--r--pom.xml23
-rw-r--r--src/main/assembly/assemble_repository.xml19
-rw-r--r--src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java5
-rw-r--r--src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java3
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/SessionAttributes.java11
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java14
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java124
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java38
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java4
-rw-r--r--src/main/webapp/META-INF/context.xml9
-rw-r--r--src/main/webapp/WEB-INF/decorators.xml15
-rw-r--r--src/main/webapp/WEB-INF/web.xml135
-rw-r--r--src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung.html47
-rw-r--r--src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_empty.html11
-rw-r--r--src/main/webapp/bku-erkennung/bku-erkennung/bku-erkennung_helper.html17
-rw-r--r--src/main/webapp/bku-erkennung/bku-erkennung_iframe.html57
-rw-r--r--src/main/webapp/bku-erkennung/css/pngbehavior.htc86
-rw-r--r--src/main/webapp/bku-erkennung/img/blank.gifbin0 -> 49 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/siga1.gifbin0 -> 694 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/siga1.pngbin0 -> 1666 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/siga1_active.pngbin0 -> 1826 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/siga1_small.gifbin0 -> 1401 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw.gifbin0 -> 1336 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_active.pngbin0 -> 1932 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_green.gifbin0 -> 2755 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_green.pngbin0 -> 5444 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_green_bold.pngbin0 -> 5546 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_green_original.gifbin0 -> 2825 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_red.gifbin0 -> 2970 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_red.pngbin0 -> 5709 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_red_original.gifbin0 -> 3032 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_yellow.gifbin0 -> 2860 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_yellow.pngbin0 -> 5664 bytes
-rw-r--r--src/main/webapp/bku-erkennung/img/sighw_yellow_original.gifbin0 -> 2911 bytes
-rw-r--r--src/main/webapp/bku-erkennung/index.html14
-rw-r--r--src/main/webapp/css/pdfas-styles.css111
-rw-r--r--src/main/webapp/images/signatur-logo_de-100.pngbin0 -> 7852 bytes
-rw-r--r--src/main/webapp/images/signatur-logo_de.pngbin0 -> 62345 bytes
-rw-r--r--src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp61
-rw-r--r--src/main/webapp/jsp/dataok.jsp24
-rw-r--r--src/main/webapp/jsp/download.jsp40
-rw-r--r--src/main/webapp/jsp/error.jsp48
-rw-r--r--src/main/webapp/jsp/error_verify.jsp48
-rw-r--r--src/main/webapp/jsp/null_request_page.jsp46
-rw-r--r--src/main/webapp/jsp/results.jsp78
-rw-r--r--src/main/webapp/jsp/signpreview.jsp68
-rw-r--r--src/main/webapp/jsp/signupload.jsp68
-rw-r--r--src/main/webapp/jsp/verifylist.jsp73
-rw-r--r--src/main/webapp/jsp/verifypreview.jsp60
-rw-r--r--src/main/webapp/jsp/verifyupload.jsp38
-rw-r--r--src/main/webapp/parentpage/standalone.jsp17
-rw-r--r--tomcat/pdf-as.xml4
-rw-r--r--webapp/THIS_FOLDER_IS_DEPRECATED.txt1
-rw-r--r--webapp/jsp/null_request_page.jsp2
-rw-r--r--work/cfg/config.properties4
60 files changed, 1351 insertions, 110 deletions
diff --git a/.classpath b/.classpath
index 9f31db0..471f82e 100644
--- a/.classpath
+++ b/.classpath
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry excluding="**/package.html" kind="src" path="src/main/java"/>
- <classpathentry excluding="**/package.html" kind="src" path="src/test/java"/>
- <classpathentry excluding="**/package.html" kind="src" path="src/main/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4">
- <accessrules>
- <accessrule kind="accessible" pattern="**"/>
- </accessrules>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/1.4.2_11"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
</classpathentry>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/.project b/.project
index 28557b9..1ec8925 100644
--- a/.project
+++ b/.project
@@ -21,6 +21,11 @@
</arguments>
</buildCommand>
<buildCommand>
+ <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
@@ -29,6 +34,7 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
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 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="PDF-AS">
- <wb-resource deploy-path="/" source-path="/src/main/java"/>
- <wb-resource deploy-path="/" source-path="/src/test/java"/>
- <wb-resource deploy-path="/" source-path="/src/main/resources"/>
+<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
+<property name="java-output-path" value="target/classes"/>
+ <property name="context-root" value="pdf-as"/>
</wb-module>
</project-modules>
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 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
- <fixed facet="jst.utility"/>
+ <runtime name="Apache Tomcat v5.5"/>
+ <fixed facet="jst.web"/>
<fixed facet="jst.java"/>
<installed facet="jst.java" version="1.4"/>
- <installed facet="jst.utility" version="1.0"/>
+ <installed facet="jst.web" version="2.4"/>
</faceted-project>
diff --git a/lib-maven_repository/maven2-repository.zip b/lib-maven_repository/maven2-repository.zip
index b940a0b..347de5d 100644
--- a/lib-maven_repository/maven2-repository.zip
+++ b/lib-maven_repository/maven2-repository.zip
Binary files 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">
<modelVersion>4.0.0</modelVersion>
- <packaging>jar</packaging>
+ <packaging>war</packaging>
<groupId>knowcenter</groupId>
<artifactId>pdf-as</artifactId>
<name>PDF-AS</name>
- <version>3.0.4-20080320</version>
+ <version>3.0.4-20080403</version>
<description>Amtssignatur fuer elektronische Aktenfuehrung</description>
<url>http://egovlabs.gv.at/projects/pdf-as</url>
@@ -76,7 +76,7 @@
</resource>
</resources>
- <finalName>${artifactId}-${version}</finalName>
+ <finalName>${artifactId}</finalName>
<plugins>
@@ -98,11 +98,14 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
- <!--
- <descriptor>src/main/assembly/assemble_libraries.xml</descriptor>
- <descriptor>src/main/assembly/assemble_distribution_ws.xml</descriptor>
- -->
- <descriptor>src/main/assembly/assemble_distribution_cl.xml</descriptor>
+ <descriptors>
+ <!--
+ <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>
+ </descriptors>
</configuration>
</plugin>
@@ -280,14 +283,12 @@
<version>1.3.02</version>
</dependency>
- <!-- nur für Integration auf buergerkarte.at -->
- <!--
+ <!-- fuer Integration in andere Web-Seiten -->
<dependency>
<groupId>opensymphony</groupId>
<artifactId>sitemesh</artifactId>
<version>2.3</version>
</dependency>
- -->
</dependencies>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html -->
+<assembly>
+ <id>maven2-repository</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <repositories>
+
+ <repository>
+ <includeMetadata>false</includeMetadata>
+ <outputDirectory>/</outputDirectory>
+ </repository>
+
+ </repositories>
+
+</assembly>
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
* </p>
*/
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(" <tr>");
- writer.println(" <td width=\"10%\"><span class=\"sca\">" + caption + ":</span></td>");
+ writer.println(" <td width=\"10%\"><span>" + caption + ":</span></td>");
writer.println(" <td width=\"90%\">");
value = value.replaceAll("\\s", " ");
value = value.replaceAll("\\\"", "\\\"");
String input_key = name_prefix + key;
- writer.println(" <input class=\"sin\" name=\"" + input_key + "\" type=\"text\" value=\"" + (write_value ? value : "wird automatisch ausgefüllt") + "\" />");
+ writer.println(" <input size=\"70\" name=\"" + input_key + "\" type=\"text\" value=\"" + (write_value ? value : "wird automatisch ausgefüllt") + "\" />");
writer.println(" </td>");
writer.println(" </tr>");
@@ -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("<div class=\"listtype\">Signatur: " + title + "</div>");
- writer.println("<table cellpadding=\"1\" cellspacing=\"1\" class=\"listtable\">");
+ writer.println("<table cellpadding=\"2\" cellspacing=\"0\" class=\"pdfaslisttable\">");
// 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(" <tr>");
- writer.println(" <td width=\"10%\">" + caption + ":</td>");
- writer.println(" <td width=\"90%\">");
+ writer.println(" <td class=\"pdfascaption\">" + caption + ":</td>");
+ writer.println(" <td class=\"pdfasvalue\">");
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context path="/pdf-as" cookies="false" reloadable="false">
+ <Manager pathname="" />
+
+ <!-- Use system property "pdf-as.work-dir" instead. -->
+ <!--
+ <Parameter name="work-dir" value="D:/dev/proj/PDF-AS/work" override="false"/>
+ -->
+</Context>
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 @@
+<decorators>
+
+ <excludes>
+ <pattern>/bku-erkennung/*</pattern>
+ <pattern>/css/*</pattern>
+ <pattern>/img/*</pattern>
+ <pattern>*.pdf</pattern>
+ <pattern>/*.pdf</pattern>
+ </excludes>
+
+ <decorator name="admin" page="/parentpage/standalone.jsp">
+ <pattern>/*</pattern>
+ </decorator>
+
+</decorators>
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 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <description>
+ EGIZ PDF-AS
+ </description>
+ <display-name>PDF-AS</display-name>
+
+ <context-param>
+ <description>
+ 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.
+ </description>
+ <param-name></param-name>
+ <param-value>override this in your context file (pdf-as.xml)</param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>sitemesh</filter-name>
+ <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>sitemesh</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <listener>
+ <listener-class>at.knowcenter.wag.egov.egiz.web.PdfASServletContextListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>Sign</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.servlets.SignServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>ProvidePDF</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.servlets.ProvidePDFServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>SignPreview</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.servlets.SignPreviewServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>RetrieveSignatureData</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.servlets.RetrieveSignatureDataServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>DataURL</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.servlets.DataURLServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Verify</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.servlets.VerifyServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>VerifyPreview</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.servlets.VerifyPreviewServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>AsynchronousDataResponder</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.AsynchronousDataResponder</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>AsynchronousRedirectResponder</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.AsynchronousRedirectResponder</servlet-class>
+ </servlet>
+
+
+ <servlet-mapping>
+ <servlet-name>Sign</servlet-name>
+ <url-pattern>/Sign</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>ProvidePDF</servlet-name>
+ <url-pattern>/ProvidePDF</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>SignPreview</servlet-name>
+ <url-pattern>/SignPreview</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>RetrieveSignatureData</servlet-name>
+ <url-pattern>/RetrieveSignatureData</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>DataURL</servlet-name>
+ <url-pattern>/DataURL</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Verify</servlet-name>
+ <url-pattern>/Verify</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>VerifyPreview</servlet-name>
+ <url-pattern>/VerifyPreview</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AsynchronousDataResponder</servlet-name>
+ <url-pattern>/AsynchronousDataResponder</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AsynchronousRedirectResponder</servlet-name>
+ <url-pattern>/AsynchronousRedirectResponder</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+ <welcome-file-list>
+ <welcome-file>jsp/signupload.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app> \ 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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+
+ <head>
+ <title>BKU Test</title>
+ <script language="javascript" type="text/javascript">
+ <!--
+ bkuuri='https://127.0.0.1:3496/https-security-layer-request';
+ protocol='https:';
+ if (location.protocol != 'https:') {
+ bkuuri='http://127.0.0.1:3495/http-security-layer-request';
+ protocol='http:';
+ }
+ var index = location.href.indexOf('/bku-erkennung/bku-erkennung.html');
+ if( index != -1 )
+ helperlocation = location.href.substr( 0, index );
+ else
+ helperlocation = protocol + '//' + 'demo.egiz.gv.at/bku-erkennung/v1.1';
+
+ function setBKUAvailable(flag) {
+ if (flag == true) {
+ parent.setBKUAvailable(true);
+ } else {
+ parent.setBKUAvailable(false);
+ }
+ }
+ -->
+ </script>
+ </head>
+
+ <body style="background-color:transparent">
+ <script language="javascript" type="text/javascript">
+ <!--
+ if (location.protocol == 'https:' || location.protocol == 'http:') { // also keine lokalen Aufrufe
+ document.write('<form name="bkucheckform" method="POST" target="iframename" action="' + bkuuri + '" enctype="application/x-www-form-urlencoded">');
+ document.write('<input type="hidden" name="XMLRequest" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;NullOperationRequest xmlns=&quot;http://www.buergerkarte.at/namespaces/securitylayer/1.2#&quot;/&gt;" />');
+ document.write('<input type="hidden" name="RedirectURL" value="' + helperlocation + '/bku-erkennung/bku-erkennung_helper.html"/>');
+ document.write('</form>');
+ setBKUAvailable(false);
+ document.bkucheckform.submit();
+ }
+ -->
+ </script>
+ </body>
+
+</html>
+
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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+
+ <head>
+ </head>
+
+ <body>
+ </body>
+
+</html>
+
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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+
+ <head>
+ <title>BKU Test Helper</title>
+ </head>
+
+ <body>
+ <script language="javascript" type="text/javascript">
+ <!--
+ parent.setBKUAvailable(true);
+ -->
+ </script>
+ </body>
+
+</html>
+
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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+
+ <head>
+ <title>BKU Test</title>
+ <style type="text/css">
+ /*
+ img {
+ behavior: url("css/pngbehavior.htc");
+ }
+ */
+ </style>
+ <script language="javascript" type="text/javascript">
+ <!--
+ bkuuri='https://127.0.0.1:3496/https-security-layer-request';
+ protocol='https:';
+ if (location.protocol != 'https:') {
+ bkuuri='http://127.0.0.1:3495/http-security-layer-request';
+ protocol='http:';
+ }
+ var index = location.href.indexOf('/bku-erkennung_iframe.html');
+ if( index != -1 )
+ helperlocation = location.href.substr( 0, index );
+ else
+ helperlocation = protocol + '//' + 'demo.egiz.gv.at/bku-erkennung/v1.1';
+
+ function setBKUAvailable(flag) {
+ if (flag == true) {
+ document.getElementById("statusimage").src = "img/sighw_green.gif";
+ } else {
+ document.getElementById("statusimage").src = "img/sighw_red.gif";
+ }
+ }
+ -->
+ </script>
+ </head>
+
+ <body style="background-color:transparent">
+ <img id="statusimage" src="img/sighw_yellow.gif" style="width: 152px; height: 57px;" alt="status">
+ <iframe name="iframeempty" width="0" height="0" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" src="bku-erkennung/bku-erkennung_empty.html" ></iframe>
+
+ <script language="javascript" type="text/javascript">
+ <!--
+ if (location.protocol == 'https:' || location.protocol == 'http:') { // also keine lokalen Aufrufe
+ document.write('<form name="bkucheckform" target="iframeempty" action="' + bkuuri +'" method="Post" enctype="application/x-www-form-urlencoded">');
+ document.write('<input name="XMLRequest" type="hidden" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;NullOperationRequest xmlns=&quot;http://www.buergerkarte.at/namespaces/securitylayer/1.2#&quot;/&gt;" />');
+ document.write('<input type="hidden" name="RedirectURL" value="'+ helperlocation + '/bku-erkennung/bku-erkennung_helper.html"/>');
+ document.write('</form>');
+ setBKUAvailable(false);
+ document.bkucheckform.submit();
+ }
+ -->
+ </script>
+ </body>
+
+</html>
+
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 @@
+<public:component lightWeight="true">
+<public:attach event="onpropertychange" onevent="propertyChanged()" />
+<public:attach event="onbeforeprint" onevent="beforePrint()" for="window"/>
+<public:attach event="onafterprint" onevent="afterPrint()" for="window"/>
+<script>
+
+/*
+ * PNG Behavior
+ *
+ * This script was created by Erik Arvidsson (http://webfx.eae.net/contact.html#erik)
+ * for WebFX (http://webfx.eae.net)
+ * Copyright 2002-2004
+ *
+ * For usage see license at http://webfx.eae.net/license.html
+ *
+ * Version: 1.02
+ * Created: 2001-??-?? First working version
+ * Updated: 2002-03-28 Fixed issue when starting with a non png image and
+ * switching between non png images
+ * 2003-01-06 Fixed RegExp to correctly work with IE 5.0x
+ * 2004-05-09 When printing revert to original
+ *
+ */
+
+var supported = /MSIE ((5\.5)|[6789])/.test(navigator.userAgent) &&
+ navigator.platform == "Win32";
+
+var realSrc;
+var blankSrc = "img/blank.gif";
+var isPrinting = false;
+
+if (supported) fixImage();
+
+function propertyChanged() {
+ if (!supported || isPrinting) return;
+
+ var pName = event.propertyName;
+ if (pName != "src") return;
+ // if not set to blank
+ if (!new RegExp(blankSrc).test(src))
+ fixImage();
+};
+
+function fixImage() {
+ // get src
+ var src = element.src;
+
+ // check for real change
+ if (src == realSrc && /\.png$/i.test(src)) {
+ element.src = blankSrc;
+ return;
+ }
+
+ if ( ! new RegExp(blankSrc).test(src)) {
+ // backup old src
+ realSrc = src;
+ }
+
+ // test for png
+ if (/\.png$/i.test(realSrc)) {
+ // set blank image
+ element.src = blankSrc;
+ // set filter
+ element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft." +
+ "AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
+ }
+ else {
+ // remove filter
+ element.runtimeStyle.filter = "";
+ }
+}
+
+function beforePrint() {
+ isPrinting = true;
+ element.src = realSrc;
+ element.runtimeStyle.filter = "";
+ realSrc = null;
+}
+
+function afterPrint() {
+ isPrinting = false;
+ fixImage();
+}
+
+</script>
+</public:component>
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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/blank.gif
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/siga1.gif
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/siga1.png
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/siga1_active.png
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/siga1_small.gif
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw.gif
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_active.png
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_green.gif
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_green.png
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_green_bold.png
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_green_original.gif
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_red.gif
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_red.png
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_red_original.gif
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_yellow.gif
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_yellow.png
Binary files 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
--- /dev/null
+++ b/src/main/webapp/bku-erkennung/img/sighw_yellow_original.gif
Binary files 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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+
+ <head>
+ <title>BKU-Erkennung</title>
+ </head>
+
+ <body>
+ <p>Erkennung laufender BKU-Software</p>
+ <iframe src="bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
+ </body>
+
+</html>
+
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
--- /dev/null
+++ b/src/main/webapp/images/signatur-logo_de-100.png
Binary files 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
--- /dev/null
+++ b/src/main/webapp/images/signatur-logo_de.png
Binary files 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" %>
+
+<html:xhtml />
+
+<table border="0" cellpadding="3" cellspacing="0" class="pdfassignature">
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap">Signaturwert</td>
+ <td colspan="2" class="pdfasvalue">
+ <div style="float:left;">Aqs3vMeF81wm/UJjIcLOzUs9</div>
+ <div style="float:left;">dxTBzhi2RC8avQyMAmc3v</div>
+ <div style="float:left;">WEj9HT1DI3iish4smRr</div>
+ </td>
+ </tr>
+ <tr>
+ <td rowspan="6"><img src="/pdf-as/images/signatur-logo_de-100.png" width="100" alt="Signatur-Logo"/></td>
+ <td class="pdfaslabel" nowrap="nowrap">Unterzeichner</td>
+ <td class="pdfasvalue"><input type="text" name="signer" value="&lt;wird aus dem Zertifikat extrahiert&gt;" readonly="readonly" disabled="disabled" size="40" maxlength="255"/></td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap">Datum/Zeit-UTC</td>
+ <td class="pdfasvalue"><%= DateFormatUtils.formatUTC(new Date(), "yyyy-MM-dd'T'HH:mm:ss'Z'", request.getLocale()) %></td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap">Aussteller-Zertifikat</td>
+ <td class="pdfasvalue">
+ <div class="pdfasnobreak">CN=Ausstellername,</div>
+ <div class="pdfasnobreak">O=Ausstellerorganisation,</div>
+ <div class="pdfasnobreak">C=AT</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap">Serien-Nr.</td>
+ <td class="pdfasvalue">123456</td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap">Methode</td>
+ <td class="pdfasvalue">
+ <div class="pdfasnobreak">urn:pdfsigfilter:</div>
+ <div class="pdfasnobreak">bka.gv.at:</div>
+ <div class="pdfasnobreak">text:v1.1.0</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap">Parameter</td>
+ <td class="pdfasvalue">
+ <div class="pdfasnobreak">etsi-bka-1.0@1234567890-123456789@</div>
+ <div class="pdfasnobreak">12345-1234-</div>
+ <div class="pdfasnobreak">0-</div>
+ <div class="pdfasnobreak">12345-</div>
+ <div class="pdfasnobreak">12345</div></td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap">Pr&uuml;finformation</td>
+ <td colspan="2" class="pdfasvalue">
+ Informationen zur Pr&uuml;fung der elektronischen Signatur und des Ausdrucks finden Sie unter: <input type="text" name="vservice" readonly="readonly" disabled="disabled" value="https://www.buergerkarte.at/signature-verification" size="50" maxlength="255"/>
+ </td>
+ </tr>
+</table>
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 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+<title>PDF-AS Amtssignaturen</title>
+<link rel="stylesheet" type="text/css" href="/pdf-as/css/styles.css" />
+</head>
+<body>
+<div class="maindiv">
+<h1>PDF-AS Amtssignaturen</h1>
+<div class="mainframe">
+<div class="mainheadline">Daten&auml;nderung</div>
+
+<p>
+Die Daten wurden erfolgreich &uuml;bernommen.
+</p>
+
+</div>
+<%
+ String btlurl = (String)request.getAttribute("btlurl");
+%>
+<a class="big" href="<%=btlurl%>">zur&uuml;ck zur Liste</a>
+</div>
+</body>
+</html> \ 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);
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <title>PDF-Signaturen Lokale Verbindung</title>
+ <script language="javascript" type="text/javascript">
+ <!--
+ function disableElement(elementId) {
+ document.getElementById(elementId).disabled = true;
+ document.getElementById(elementId).blur();
+ }
+ function hitButton() {
+ document.submitform.submit();
+ disableElement("SendRequestButton");
+ document.getElementById("SendRequestButton").value = "Download bereits erfolgt";
+ return(true);
+ }
+ -->
+ </script>
+ </head>
+
+ <body>
+ <h1>PDF-Signaturen</h1>
+ <h2>Dokument Signatur erstellen</h2>
+ <div class="pdfasnote">Der Signatur-Vorgang ist abgeschlossen. Das signierte Dokument kann nun heruntergeladen werden.<br/>Hinweis: Der Download ist nur einmalig m&ouml;glich. Das Dokument wird nicht am Server gespeichert.</div>
+ <div class="pdfasverticalspace"></div>
+ <form action="<%= downloadURL %>" name="submitform" accept-charset="UTF-8" method="post">
+ <input type="submit" id="SendRequestButton" value="Signiertes Dokument herunterladen" onclick="return hitButton();"/>
+ </form>
+ <div class="pdfasverticalspace"></div>
+ <a href="/pdf-as/">zur&uuml;ck</a>
+ </body>
+
+</html>
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.*" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+
+ <head>
+ <title>PDF-Signaturen Resultat</title>
+ <base href="http://www.buergerkarte.at/pdf-as/"/>
+ </head>
+
+<%
+ 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());
+%>
+
+ <body>
+ <h1>PDF-Signaturen</h1>
+ <h2>Ein Fehler ist aufgetreten</h2>
+ <div class="pdfasnote"><%= error %></div>
+ <div class="pdfasnote">Ursache: <strong><%= cause %></strong></div>
+ <div class="pdfasverticalspace"></div>
+ <a href="<%=LocalRequestHelper.getLocalServerAddress(request,response)%>pdf-as/">zur&uuml;ck</a>
+ <pre style="display:none">
+ <%
+ if (pe != null) {
+ StringWriter sw = new StringWriter();
+ PrintWriter pw = new PrintWriter(sw);
+ pe.printStackTrace(pw);
+ sw.close();
+ pw.close();
+ out.print(sw);
+ }
+ %>
+ </pre>
+ </body>
+
+</html>
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.*" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+
+ <head>
+ <title>PDF-Signaturen Resultat</title>
+ <base href="http://www.buergerkarte.at/pdf-as/"/>
+ </head>
+
+<%
+ 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());
+%>
+
+ <body>
+ <h1>PDF-Signaturen</h1>
+ <h2>Ein Fehler ist aufgetreten</h2>
+ <div class="pdfasnote"><%= error %></div>
+ <div class="pdfasnote">Ursache: <strong><%= cause %></strong></div>
+ <div class="pdfasverticalspace"></div>
+ <a href="<%=LocalRequestHelper.getLocalServerAddress(request,response)%>pdf-as/jsp/verifyupload.jsp">zur&uuml;ck</a>
+ <pre style="display:none">
+ <%
+ if (pe != null) {
+ StringWriter sw = new StringWriter();
+ PrintWriter pw = new PrintWriter(sw);
+ pe.printStackTrace(pw);
+ sw.close();
+ pw.close();
+ out.print(sw);
+ }
+ %>
+ </pre>
+ </body>
+
+</html>
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");
+%>
+<!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" />
+ <title>PDF-Signaturen Lokale Verbindung</title>
+ <script language="javascript" type="text/javascript">
+ <!--
+ function disableElement(elementId) {
+ document.getElementById(elementId).disabled = true;
+ document.getElementById(elementId).blur();
+ return(true);
+ }
+ function hitButton() {
+ document.submitform.submit();
+ disableElement("SendRequestButton");
+ document.getElementById("SendRequestButton").value = "Bitte warten...";
+ }
+ -->
+ </script>
+ </head>
+
+ <body>
+ <h1>PDF-Signaturen</h1>
+ <h2>Dokument Signatur erstellen</h2>
+ <div class="pdfasnote">Die Verbindung zu Ihrer B&uuml;rgerkartenumgebung wird hergestellt...</div>
+ <div class="pdfasverticalspace"></div>
+ <form action="<%= local_request_url %>" name="submitform" accept-charset="UTF-8" method="post"><!-- enctype="multipart/form-data"-->
+ <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="Absenden..." />
+ </form>
+ <div class="pdfasverticalspace"></div>
+ <a href="/pdf-as/">zur&uuml;ck</a>
+ <script language="javascript" type="text/javascript">
+ <!--
+ window.setTimeout("hitButton()", 800);
+ -->
+ </script>
+ </body>
+
+</html>
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;
+ }
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <title>PDF-Signaturen</title>
+ </head>
+ <body>
+ <h1>PDF-Signaturen</h1>
+ <h2>Pr&uuml;fergebnis</h2>
+ <%
+ Iterator resit = results.iterator();
+ while (resit.hasNext()) {
+ SignatureResponse result = (SignatureResponse) resit.next();
+ %>
+
+ <div class="pdfasverticalspace"></div>
+ <fieldset class="pdfasresultfieldset">
+ <legend><b>Signatur-Check</b></legend>
+ <div class="<%= "0".equals(result.getSignatureCheckCode()) ? "pdfasok" : "pdfasnok" %>"><%= result.getSignatureCheckInfo() %></div>
+ </fieldset>
+
+ <div class="pdfassmallverticalspace"></div>
+ <fieldset class="pdfasresultfieldset">
+ <legend><b>Zertifikat</b></legend>
+ <table class="pdfaslisttable" cellpadding="1" cellspacing="1">
+ <tr><td class="pdfascaption">Signator:</td><td class="pdfasvalue"><%= result.getX509SubjectName() %></td></tr>
+ <tr><td class="pdfascaption">Aussteller:</td><td class="pdfasvalue"><%= result.getX509IssuerName() %></td></tr>
+ <tr><td class="pdfascaption">Seriennummer:</td><td class="pdfasvalue"><%= result.getX509SerialNumber() %></td></tr>
+ <%
+ List public_properties = result.getPublicProperties();
+ Iterator propit = public_properties.iterator();
+ while (propit.hasNext()) {
+ String public_property = (String) propit.next();
+ %>
+ <tr><td class="pdfascaption">Eigenschaft:</td><td class="pdfasvalue"><%= public_property %></td></tr>
+ <%
+ }
+ %>
+ <tr><td class="pdfascaption">Zertifikat:</td><td class="<%= "0".equals(result.getCertificateCheckCode()) ? "pdfasok" : "pdfasnok" %>"><%= result.getCertificateCheckInfo() %></td></tr>
+ </table>
+ </fieldset>
+
+ <div class="pdfassmallverticalspace"></div>
+ <fieldset class="pdfasresultfieldset">
+ <legend><b>Manifest-Check</b></legend>
+ <div class="<%= "0".equals(result.getSignatureManifestCheckCode()) ? "pdfasok" : "pdfasnok" %>"><%= result.getSignatureManifestCheckInfo() %></div>
+ </fieldset>
+
+ <%
+ if (resit.hasNext()) {
+ %>
+ <br />
+ <%
+ }
+ }
+ %>
+ <div class="pdfasverticalspace"></div>
+ <% if (backbutton) { %>
+ <a href="/pdf-as/jsp/verifyupload.jsp">zur&uuml;ck</a>
+ <% } %>
+ <% if (btlurl != null) { %>
+ <a href="<%=btlurl%>">zur&uuml;ck zur Liste</a>
+ <% } %>
+ </body>
+</html>
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());
+ }
+%>
+
+<!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" />
+ <title>PDF-Signaturen Vorschau</title>
+ </head>
+
+ <body>
+ <h1>PDF-Signaturen</h1>
+ <h2>Vorschau: Dokument Signieren</h2>
+ <%
+ if (si.mode.equals(FormFields.VALUE_MODE_TEXTUAL)) {
+ %>
+ <form action="<%= submit_url %>" name="submitform" enctype="multipart/form-data" accept-charset="UTF-8" method="get">
+ <pre class="pdfasnt"><%= document_text != null ? document_text : "" %></pre>
+ <div>
+ <!-- =============================================== Start BKU-Erkennung -->
+ <iframe src="bku-erkennung/bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
+ <!-- ================================================ Stop BKU-Erkennung -->
+ </div>
+ <input type="submit" value="Signieren..." />
+ </form>
+ <%
+ } else {
+ %>
+ <div class="pdfasverticalspace"></div>
+ <form action="<%= signature_data_url %>" method="get" target="blank_">
+ <input type="submit" value="Vorschaudokument anzeigen..." />
+ </form>
+ <div class="pdfasverticalspace"></div>
+ <div>
+ <!-- =============================================== Start BKU-Erkennung -->
+ <iframe src="bku-erkennung/bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
+ <!-- ================================================ Stop BKU-Erkennung -->
+ </div>
+ <form action="<%= submit_url %>" method="get">
+ <input type="submit" value="Signieren..." />
+ </form>
+ <%
+ }
+ %>
+ <div class="pdfasverticalspace"></div>
+ <a href="/pdf-as/">zur&uuml;ck</a>
+ </body>
+
+</html>
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" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+ <title>PDF-Signaturen</title>
+ <% session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); %>
+</head>
+<body>
+<h1>PDF-Signaturen</h1>
+<h2>Dokument Signatur erstellen</h2>
+<div class="pdfasnote">Bitte w&auml;hlen Sie die zu signierende PDF-Datei. Diese wird mit Ihrer B&uuml;rgerkarte signiert.</div>
+<form name="submitform"
+ enctype="multipart/form-data"
+ accept-charset="UTF-8"
+ method="post"
+ action="/pdf-as/Sign">
+ <table border="0" cellspacing="0" cellpadding="4" id="pdfasupperformtable">
+ <tr>
+ <td nowrap="nowrap"><label>PDF Datei:</label></td>
+ <td><input size="50" type="file" name="<%= FormFields.FIELD_UPLOAD %>" accept="application/pdf" /></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap"><label>Signatur Typ:</label></td>
+ <td>
+ <select class="field" name="sig_type">
+ <option value="SIGNATURBLOCK_DE" selected="selected">Standardsignatur Deutsch</option>
+ <option value="SIGNATURBLOCK_EN" >Standardsignatur Englisch</option>
+ </select>
+ <!-- %= // FormFields.generateTypeSelectBox() % -->
+ </td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap"><label>Signatur Modus:</label></td>
+ <td>
+ <select name="<%= FormFields.FIELD_MODE %>">
+ <option value="<%= FormFields.VALUE_MODE_BINARY %>">bin&auml;r</option>
+ <option value="<%= FormFields.VALUE_MODE_TEXTUAL %>" selected="selected">textuell</option>
+ <!--
+ <option value="<%= FormFields.VALUE_MODE_DETACHED %>">detached</option>
+ -->
+ </select>
+ </td>
+ </tr>
+ </table>
+
+ <input type="hidden" name="connector" value="bku"/>
+ <input type="hidden" name="<%= FormFields.FIELD_DOWNLOAD %>" value="<%= FormFields.VALUE_DOWNLOAD_ATTACHMENT %>"/>
+ <input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
+
+ <div class="pdfasverticalspace"></div>
+
+ <jsp:include page="SIGNATURBLOCK_DE.jsp"/>
+
+ <div class="pdfasnote">Hinweis: Das Erscheinungsbild der Signaturmarke kann abh&auml;ngig vom Signatur Typ, vom Signatur Modus, von der verwendeten B&uuml;rgerkarte, sowie von der verwendeten B&uuml;rgerkartenumgebung variieren.</div>
+ <div>
+ <!-- =============================================== Start BKU-Erkennung -->
+ <iframe src="/pdf-as/bku-erkennung/bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
+ <!-- ================================================ Stop BKU-Erkennung -->
+ </div>
+ <input type="submit" value="Signatur erstellen" />
+ <input type="submit" value="Vorschau" onclick="document.submitform.<%= FormFields.FIELD_PREVIEW %>.value='true'" />
+
+</form>
+
+</body>
+</html> \ 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;
+
+%>
+<!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" />
+ <title>PDF-Signaturen</title>
+ </head>
+ <body>
+ <h1>PDF-Signaturen</h1>
+ <%
+ if (signature_holders.size() > 1) {
+ %>
+ <h2>Dokument Signaturen pr&uuml;fen</h2>
+ <% } else { %>
+ <h2>Dokument Signatur pr&uuml;fen</h2>
+ <%
+ }
+ %>
+ <%
+ for (int i = 0; i < signature_holders.size(); i++) {
+ SignatureHolder holder = (SignatureHolder) signature_holders.get(i);
+ %>
+ <div class="pdfasverticalspace"></div>
+ <div class="pdfaslisttablecontainer">
+ <%= VerifyPreviewServlet.renderRequiredKeysText(holder.getSignatureObject()) %>
+ <form action="<%= response.encodeURL(request.getContextPath() + "/VerifyPreview") %>"
+ accept-charset="UTF-8"
+ method="get"
+ style="float:left;">
+ <input type="hidden" name="<%= FormFields.FIELD_VERIFY_WHICH %>" value="<%= i %>" />
+ <input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
+ <input type="submit" value="Nur diese Signatur pr&uuml;fen" />
+ </form>
+ <form action="<%= response.encodeURL(request.getContextPath() + "/VerifyPreview") %>"
+ accept-charset="UTF-8"
+ method="get"
+ style="float:left;">
+ <input type="hidden" name="<%= FormFields.FIELD_VERIFY_WHICH %>" value="<%= i %>" />
+ <input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="true" />
+ <input type="submit" value="Vorschau..." />
+ </form>
+ </div>
+ <%
+ }
+ %>
+ <div class="pdfasverticalspace"></div>
+ <div class="pdfasverticalspace"></div>
+ <form action="<%= response.encodeURL(request.getContextPath() + "/VerifyPreview") %>"
+ accept-charset="UTF-8"
+ method="get">
+ <input type="hidden" name="<%= FormFields.FIELD_VERIFY_WHICH %>" value="<%= FormFields.VALUE_VERIFY_WHICH_ALL %>" />
+ <input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
+ <input type="submit" value="Alle pr&uuml;fen" />
+ </form>
+ <div class="pdfasverticalspace"></div>
+ <a href="/pdf-as/jsp/verifyupload.jsp">zur&uuml;ck</a>
+ </body>
+</html>
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);
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+ <title>PDF-Signaturen</title>
+ <script type="text/javascript">
+ <!--
+ function initSigValues() {
+ <%= VerifyPreviewServlet.renderRequiredKeysJavaScript(signature_holder.getSignatureObject(), "") %>
+ }
+ -->
+ </script>
+</head>
+<body">
+<h1>PDF-Signaturen</h1>
+<h2>Vorschau: Dokument pr&uuml;fen</h2>
+<form action="<%= response.encodeURL(request.getContextPath() + "/VerifyPreview") %>"
+ name="submitform"
+ enctype="multipart/form-data"
+ accept-charset="UTF-8"
+ method="post">
+ <input type="hidden" name="<%= FormFields.FIELD_VERIFY_WHICH %>" value="<%= verify_which %>" />
+ <div class="pdfasnote"><label>Rekonstruktion der Signaturmarke:</label></div>
+ <div class="pdfasverticalspace"></div>
+ <textarea class="pdfaspreviewfield" rows="14" name="<%= FormFields.FIELD_RAW_DOCUMENT_TEXT %>"><%= ((TextualSignatureHolder)signature_holder).getSignedText() %></textarea>
+ <%= VerifyPreviewServlet.renderRequiredKeys(signature_holder.getSignatureObject(), "", false) %>
+ <br />
+ <input type="hidden" name="verify" value="false" />
+ <input type="submit" value="Werte &uuml;bernehmen" />
+ <input type="submit" value="Werte &uuml;bernehmen und pr&uuml;fen" onclick="document.submitform.verify.value='true'" />
+</form>
+<div class="pdfasverticalspace"></div>
+<a href="/pdf-as/jsp/verifyupload.jsp">zur&uuml;ck</a>
+<a href="<%=btlurl%>">zur&uuml;ck zur Liste</a>
+ <script language="javascript" type="text/javascript">
+ <!--
+ initSigValues();
+ -->
+ </script>
+</body>
+</html>
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" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+ <title>PDF-Signaturen</title>
+</head>
+<body>
+<h1>PDF-Signaturen</h1>
+<h2>Dokument Signatur pr&uuml;fen</h2>
+<div class="pdfasnote">Hier bitte den vollständigen Dokumenttext samt Signaturblock eingeben.<br/></div>
+<form name="submitform" enctype="multipart/form-data" method="post" action="/pdf-as/Verify" accept-charset="UTF-8">
+ <textarea class="pdfaspreviewfield" rows="14" name="<%= FormFields.FIELD_UPLOAD %>"></textarea>
+ <table border="0" cellspacing="0" cellpadding="4" id="pdfasupperformtable">
+ <tr>
+ <td nowrap="nowrap"><label>Pr&uuml;f Applikation:</label></td>
+ <td><%= FormFields.generateConnectorSelectBox() %></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap"><label>Pr&uuml;f Modus:</label></td>
+ <td><span>textuell</span></td>
+ </tr>
+ </table>
+
+ <div>
+ <!-- =============================================== Start BKU-Erkennung -->
+ <iframe src="/pdf-as/bku-erkennung/bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
+ <!-- ================================================ Stop BKU-Erkennung -->
+ </div>
+ <input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
+ <input type="submit" value="Alle pr&uuml;fen" />
+ <input type="submit" value="Signaturen auflisten" onclick="document.submitform.<%= FormFields.FIELD_PREVIEW %>.value='true'" />
+
+</form>
+<div class="pdfasverticalspace"></div>
+<a href="/pdf-as/">zur&uuml;ck</a>
+</body>
+</html> \ 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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %>
+
+<html:html xhtml="true">
+
+ <head>
+ <decorator:head/>
+ <link rel="stylesheet" type="text/css" href="<%=LocalRequestHelper.getLocalServerAddress(request,response)%>pdf-as/css/pdfas-styles.css" />
+ </head>
+
+ <body><decorator:body/></body>
+
+</html:html>
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 @@
-<Context cookies="false" reloadable="true" path="pdf-as" docBase="<change this path>\06PDF-AS\webapp">
+<Context cookies="false" reloadable="true" path="pdf-as" docBase="<change this path>\PDF-AS\webapp">
- <Parameter name="work-dir" value="<change this path>\06PDF-AS\work" override="false"/>
+ <Parameter name="work-dir" value="<change this path>\PDF-AS\work" override="false"/>
</Context>
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 @@
<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="hidden" name="DataURL" value="<%= data_url %>"/>
<input class="ip" type="submit" value="Abschicken..." />
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