aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at
diff options
context:
space:
mode:
authorChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-06-23 10:06:40 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-08-17 16:54:05 +0200
commitda64c825de6ad061f5c734630faf0d6e9606dc12 (patch)
treeb4b2a7cc5bca351cf8d06bdf229ed4b9efbf8119 /pdf-as-web/src/main/java/at
parent73eb447af6122887bf84426b89c62eb592ca16fa (diff)
downloadpdf-as-4-da64c825de6ad061f5c734630faf0d6e9606dc12.tar.gz
pdf-as-4-da64c825de6ad061f5c734630faf0d6e9606dc12.tar.bz2
pdf-as-4-da64c825de6ad061f5c734630faf0d6e9606dc12.zip
Added Profile configuration validation
Diffstat (limited to 'pdf-as-web/src/main/java/at')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java
index b70539a4..f21447dd 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java
@@ -40,6 +40,10 @@ import org.slf4j.LoggerFactory;
import at.gv.egiz.pdfas.common.exceptions.PDFASError;
import at.gv.egiz.pdfas.common.exceptions.PdfAsException;
+import at.gv.egiz.pdfas.common.exceptions.PdfAsSettingsException;
+import at.gv.egiz.pdfas.common.exceptions.PdfAsSettingsValidationException;
+import at.gv.egiz.pdfas.common.settings.ISettings;
+import at.gv.egiz.pdfas.lib.api.PdfAsFactory;
import at.gv.egiz.pdfas.lib.api.verify.VerifyParameter.SignatureVerificationLevel;
import at.gv.egiz.pdfas.web.config.WebConfiguration;
import at.gv.egiz.pdfas.web.exception.PdfAsWebException;
@@ -49,10 +53,10 @@ import at.gv.egiz.pdfas.web.helper.PdfAsHelper;
import at.gv.egiz.pdfas.web.helper.PdfAsParameterExtractor;
import at.gv.egiz.pdfas.web.helper.RemotePDFFetcher;
import at.gv.egiz.pdfas.web.stats.StatisticEvent;
-import at.gv.egiz.pdfas.web.stats.StatisticFrontend;
import at.gv.egiz.pdfas.web.stats.StatisticEvent.Operation;
import at.gv.egiz.pdfas.web.stats.StatisticEvent.Source;
import at.gv.egiz.pdfas.web.stats.StatisticEvent.Status;
+import at.gv.egiz.pdfas.web.stats.StatisticFrontend;
/**
* Servlet implementation class Sign
@@ -71,8 +75,9 @@ public class ExternSignServlet extends HttpServlet {
/**
* Default constructor.
+
*/
- public ExternSignServlet() {
+ public ExternSignServlet(){
String webconfig = System.getProperty(PDF_AS_WEB_CONF);
if(webconfig == null) {
@@ -82,6 +87,14 @@ public class ExternSignServlet extends HttpServlet {
WebConfiguration.configure(webconfig);
PdfAsHelper.init();
+
+ try {
+ PdfAsFactory.validateConfiguration((ISettings)PdfAsHelper.getPdfAsConfig());
+ } catch (PdfAsSettingsValidationException e) {
+ // TODO Auto-generated catch block
+ logger.error(e.getLocalizedMessage(),e.getCause());
+ //e.printStackTrace();
+ }
}
protected void doGet(HttpServletRequest request,