aboutsummaryrefslogtreecommitdiff
path: root/simpleSigning/src/main/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'simpleSigning/src/main/webapp')
-rw-r--r--simpleSigning/src/main/webapp/WEB-INF/web.xml44
-rw-r--r--simpleSigning/src/main/webapp/index.jsp89
-rw-r--r--simpleSigning/src/main/webapp/mobile-bku.pngbin0 -> 4555 bytes
-rw-r--r--simpleSigning/src/main/webapp/online-bku.pngbin0 -> 5529 bytes
-rw-r--r--simpleSigning/src/main/webapp/pdfas.css15
5 files changed, 148 insertions, 0 deletions
diff --git a/simpleSigning/src/main/webapp/WEB-INF/web.xml b/simpleSigning/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..83c9904
--- /dev/null
+++ b/simpleSigning/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <!-- General description of your web application -->
+
+ <display-name>Simple Signing</display-name>
+ <description>Simple Signing Application</description>
+
+ <servlet>
+ <servlet-name>PDFASJsServlet</servlet-name>
+ <display-name>PDFASJsServlet</display-name>
+ <description></description>
+ <servlet-class>at.gv.egiz.simpleSigning.PDFASJsServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <!-- Define mappings that are used by the servlet container to translate
+ a particular request URI (context-relative) to a particular servlet. The
+ examples below correspond to the servlet descriptions above. Thus, a request
+ URI like: http://localhost:8080/{contextpath}/graph will be mapped to the
+ "graph" servlet, while a request like: http://localhost:8080/{contextpath}/saveCustomer.do
+ will be mapped to the "controller" servlet. You may define any number of
+ servlet mappings, including zero. It is also legal to define more than one
+ mapping for the same servlet, if you wish to. -->
+
+ <servlet-mapping>
+ <servlet-name>PDFASJsServlet</servlet-name>
+ <url-pattern>/pdfas.js</url-pattern>
+ </servlet-mapping>
+ <!-- Define the default session timeout for your application, in minutes.
+ From a servlet or JSP page, you can modify the timeout for a particular session
+ dynamically by using HttpSession.getMaxInactiveInterval(). -->
+
+ <session-config>
+ <session-timeout>30</session-timeout> <!-- 30 minutes -->
+ </session-config>
+
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app> \ No newline at end of file
diff --git a/simpleSigning/src/main/webapp/index.jsp b/simpleSigning/src/main/webapp/index.jsp
new file mode 100644
index 0000000..993c17f
--- /dev/null
+++ b/simpleSigning/src/main/webapp/index.jsp
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<script type="text/javascript" src="pdfas.js"></script>
+
+<script type="text/javascript">
+
+ function sign() {
+ var op = {
+ };
+
+ var typeOption = document.getElementById("type");
+
+ if(typeOption.options[typeOption.selectedIndex].value == "TEXT") {
+ pdfAs.signText(op, function(code, msg) {
+ var element = document.getElementById("Error");
+ element.innerHTML="<p>Error: "+code+" (" + msg + ")</p>";
+ }, function(pdfurl) {
+ var element = document.getElementById("Result");
+ element.innerHTML="<a href=\"" + pdfurl + "\">ready</a>";
+ });
+ } else {
+ pdfAs.signPdf(op, function(code, msg) {
+ var element = document.getElementById("Error");
+ element.innerHTML="<p>Error: "+code+" (" + msg + ")</p>";
+ }, function(pdfurl) {
+ var element = document.getElementById("Result");
+ element.innerHTML="<a href=\"" + pdfurl + "\">ready</a>";
+ });
+ }
+ }
+
+ function signWidthContent() {
+
+ var valueContent = document.getElementById("txtContent").value;
+
+ var op = {
+ content: valueContent
+ };
+
+ var typeOption = document.getElementById("type");
+
+ if(typeOption.options[typeOption.selectedIndex].value == "TEXT") {
+ pdfAs.signText(op, function(code, msg) {
+ var element = document.getElementById("Error");
+ element.innerHTML="<p>Error: "+code+" (" + msg + ")</p>";
+ }, function(pdfurl) {
+ var element = document.getElementById("Result");
+ element.innerHTML="<a href=\"" + pdfurl + "\">ready</a>";
+ });
+ } else {
+ pdfAs.signPdf(op, function(code, msg) {
+ var element = document.getElementById("Error");
+ element.innerHTML="<p>Error: "+code+" (" + msg + ")</p>";
+ }, function(pdfurl) {
+ var element = document.getElementById("Result");
+ element.innerHTML="<a href=\"" + pdfurl + "\">ready</a>";
+ });
+ }
+ }
+</script>
+
+</head>
+<body>
+
+<select id="type">
+ <option value="TEXT">Text</option>
+ <option value="PDF">PDF</option>
+</select>
+
+<p>
+<input type="text" id="txtContent"></input>
+</p>
+
+<p>
+<button onclick="sign()">Sign</button>
+</p>
+<p>
+<button onclick="signWidthContent()">Sign Content</button>
+</p>
+<div id="Error"></div>
+
+<div id="Result"></div>
+
+<div style="width:800px;height:600px;border:1px" id="test"></div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/simpleSigning/src/main/webapp/mobile-bku.png b/simpleSigning/src/main/webapp/mobile-bku.png
new file mode 100644
index 0000000..c5783bf
--- /dev/null
+++ b/simpleSigning/src/main/webapp/mobile-bku.png
Binary files differ
diff --git a/simpleSigning/src/main/webapp/online-bku.png b/simpleSigning/src/main/webapp/online-bku.png
new file mode 100644
index 0000000..9f7f3e3
--- /dev/null
+++ b/simpleSigning/src/main/webapp/online-bku.png
Binary files differ
diff --git a/simpleSigning/src/main/webapp/pdfas.css b/simpleSigning/src/main/webapp/pdfas.css
new file mode 100644
index 0000000..58f9ea1
--- /dev/null
+++ b/simpleSigning/src/main/webapp/pdfas.css
@@ -0,0 +1,15 @@
+@CHARSET "UTF-8";
+
+.floatleft, .floatright, .floatcenter {
+ width: 30%;
+ text-align: center;
+ position: relative;
+ display: inline-block;
+}
+.bkubox {
+ display: block;
+ margin: 0.8em;
+}
+.input_container {
+ width: 100%;
+} \ No newline at end of file