aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/knowcenter/wag')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java5
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java6
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java
index 3f1342d..0ebe3ea 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java
@@ -230,6 +230,7 @@ public class SignServlet 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");
+ return;
}
}
try
@@ -394,7 +395,7 @@ public class SignServlet extends HttpServlet
String sig_type = sig_type_fi.getString("UTF-8"); //$NON-NLS-1$
String sig_app = sig_app_fi.getString("UTF-8"); //$NON-NLS-1$
- String doc_file_name = file_upload_fi.getName();
+ String doc_file_name = TempDirHelper.extractFileNameSuffix(file_upload_fi.getName());
log.debug("file content type =" + file_upload_fi.getContentType()); //$NON-NLS-1$
String extension = VerifyServlet.extractExtension(doc_file_name);
@@ -415,7 +416,7 @@ public class SignServlet extends HttpServlet
}
catch (IOException e)
{
- throw new PDFDocumentException(201, "Couldn't store the file in the temp dir.");
+ throw new PDFDocumentException(201, "Couldn't store the file in the temp dir.", e);
}
// byte[] pdf = file_upload_fi.get();
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 bb6a13f..38f3e64 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
@@ -273,7 +273,8 @@ public class VerifyServlet extends HttpServlet
{
try
{
- PdfDataSource pdfDataSource = TempDirHelper.placePdfIntoTempDir(upload_fi.getInputStream(), upload_fi.getName());
+ String fileNameSuffix = TempDirHelper.extractFileNameSuffix(upload_fi.getName());
+ PdfDataSource pdfDataSource = TempDirHelper.placePdfIntoTempDir(upload_fi.getInputStream(), fileNameSuffix);
return pdfDataSource;
}
catch (IOException e)
@@ -285,8 +286,9 @@ public class VerifyServlet extends HttpServlet
try
{
+ String fileNameSuffix = TempDirHelper.extractFileNameSuffix(upload_fi.getName());
String text = new String(upload_fi.get(), "UTF-8"); //$NON-NLS-1$
- TextDataSource textDataSource = TempDirHelper.placeTextIntoTempDir(text, upload_fi.getName());
+ TextDataSource textDataSource = TempDirHelper.placeTextIntoTempDir(text, fileNameSuffix);
return textDataSource;
}
catch (IOException e)