diff options
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/LocalRequestHelper.java | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/LocalRequestHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/LocalRequestHelper.java index 2edaba5..202dd40 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/LocalRequestHelper.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/LocalRequestHelper.java @@ -52,12 +52,12 @@ import at.knowcenter.wag.egov.egiz.exceptions.SignatureException; /**
* Contains commonly used helper functions for the local request procedure.
- *
+ *
* @author wprinz
*/
public abstract class LocalRequestHelper
{
-
+
/**
* The logger.
*/
@@ -80,7 +80,7 @@ public abstract class LocalRequestHelper /**
* Sets up the local sign procedure.
- *
+ *
* @param response
* The HttpServletResponse the local request page is written to.
* @throws IOException
@@ -101,7 +101,7 @@ public abstract class LocalRequestHelper si.outputAvailable = false;
URL data_URL = new URL(request.getScheme(), host, request.getServerPort(), WebUtils.addJSessionID(request.getContextPath() + "/DataURL", request));
-
+
String data_url = response.encodeURL(data_URL.toString());
logger.debug("data_url = " + data_url);
@@ -113,8 +113,8 @@ public abstract class LocalRequestHelper /**
* Sets up the local verify procedure.
- * @param list
- *
+ * @param list
+ *
* @param response
* The HttpServletResponse the local request page is written to.
* @return Returns the JSP location where the calling servlet should dispatch
@@ -127,18 +127,18 @@ public abstract class LocalRequestHelper * Forwarded exception.
* @throws ConnectorFactoryException
* Forwarded exception.
- * @throws SettingsException
- * @throws ConnectorException
+ * @throws SettingsException
+ * @throws ConnectorException
*/
public static String processLocalVerify(PdfAsInternal pdfAsInternal, VerifySessionInformation si, List signaturesToBeverified, HttpServletRequest request, HttpServletResponse response) throws SignatureException, NormalizeException,
IOException, ConnectorFactoryException, SettingsException, ConnectorException
{
si.currentLocalOperation = new CurrentLocalOperation();
si.currentLocalOperation.signaturesToBeverified = signaturesToBeverified; // SignatureInformation
-
+
si.currentLocalOperation.requests = new LocalRequest[signaturesToBeverified.size()];
si.currentLocalOperation.response_xmls = new String[si.currentLocalOperation.requests.length];
-
+
si.currentLocalOperation.current_operation = 0;
String host = request.getServerName();
@@ -169,12 +169,12 @@ public abstract class LocalRequestHelper /**
* Formats the OK response from the web application back to the local BKU.
- *
+ *
* <p>
* As stated in the BKU tutorial, this response must be plain text "<ok/>".
* Otherwise BKU will assume a failure.
* </p>
- *
+ *
* @param response
* The HttpServletResponse to answer to.
* @throws IOException
@@ -191,7 +191,6 @@ public abstract class LocalRequestHelper public static String makeStringHTMLReady(String input)
{
String output = input;
-
output = output.replaceAll("&", "&");
output = output.replaceAll("\"", """);
output = output.replaceAll("<", "<");
@@ -223,7 +222,7 @@ public abstract class LocalRequestHelper return loc_server;
}
-
+
public static String getLocalContextAddress(HttpServletRequest request, HttpServletResponse response) {
String serverURL = getLocalServerAddress(request, response);
String context = request.getContextPath();
@@ -235,7 +234,7 @@ public abstract class LocalRequestHelper /**
* Tells, if the given connector is local.
- *
+ *
* @param connector_identifier
* The connector.
* @return Returns true, if the given connector is local, false otherwise.
|