aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
authorThomas Knall <t.knall@datentechnik-innovation.com>2015-02-04 13:54:32 +0100
committerThomas Knall <t.knall@datentechnik-innovation.com>2015-02-04 13:54:32 +0100
commita9dc7e094a8732f9826ab77648758dd39adc7324 (patch)
treef88ddc37edf6f0e6328ab6322e63e563053874a0 /id
parent215b326e807659b30c520478e8123a888df6d204 (diff)
downloadmoa-id-spss-a9dc7e094a8732f9826ab77648758dd39adc7324.tar.gz
moa-id-spss-a9dc7e094a8732f9826ab77648758dd39adc7324.tar.bz2
moa-id-spss-a9dc7e094a8732f9826ab77648758dd39adc7324.zip
Add logging for automatic servlet registration.
Diffstat (limited to 'id')
-rw-r--r--id/server/auth/src/main/webapp/WEB-INF/web.xml9
-rw-r--r--id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java19
2 files changed, 23 insertions, 5 deletions
diff --git a/id/server/auth/src/main/webapp/WEB-INF/web.xml b/id/server/auth/src/main/webapp/WEB-INF/web.xml
index 41c46bd22..930b10f43 100644
--- a/id/server/auth/src/main/webapp/WEB-INF/web.xml
+++ b/id/server/auth/src/main/webapp/WEB-INF/web.xml
@@ -137,16 +137,23 @@
<servlet-class>at.gv.egovernment.moa.id.auth.servlet.ProcessEngineSignalServlet</servlet-class>
</servlet>
<servlet-mapping>
+ <!-- do not change this servlet-name -->
<servlet-name>ProcessEngineSignal</servlet-name>
+
<!-- Use this url-pattern in order to signal the next (asynchronous) task. -->
<url-pattern>/signalProcess</url-pattern>
+
<!-- legacy url patterns for asynchronous tasks (internal default module/processes) -->
<url-pattern>/GetMISSessionID</url-pattern>
<url-pattern>/GetForeignID</url-pattern>
<url-pattern>/VerifyAuthBlock</url-pattern>
<url-pattern>/VerifyCertificate</url-pattern>
<url-pattern>/VerifyIdentityLink</url-pattern>
- <!-- STORK servlet mappings; automatically registered by the stork module -->
+
+ <!--
+ STORK servlet mappings; automatically registered by the stork module;
+ refer to at.gv.egovernment.moa.id.auth.modules.stork.STORKWebApplicationInitializer
+ -->
<!--
<url-pattern>/PEPSConnectorWithLocalSigning</url-pattern>
<url-pattern>/PEPSConnector</url-pattern>
diff --git a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java
index 7478a57c3..c54c9a26d 100644
--- a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java
+++ b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java
@@ -4,6 +4,8 @@ import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.web.WebApplicationInitializer;
import at.gv.egovernment.moa.id.auth.servlet.ProcessEngineSignalServlet;
@@ -23,15 +25,24 @@ import at.gv.egovernment.moa.id.auth.servlet.ProcessEngineSignalServlet;
* @see ProcessEngineSignalServlet
*/
public class STORKWebApplicationInitializer implements WebApplicationInitializer {
+
+ private Logger log = LoggerFactory.getLogger(getClass());
+
+ private static final String SIGNAL_SERVLET_NAME = "ProcessEngineSignal";
+
+ private void addMapping(ServletRegistration servletRegistration, String mapping) {
+ log.debug("Adding mapping '{}' to servlet '{}' ({}).", mapping, SIGNAL_SERVLET_NAME, servletRegistration.getClassName());
+ servletRegistration.addMapping(mapping);
+ }
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
- ServletRegistration servletRegistration = servletContext.getServletRegistration("ProcessEngineSignal");
+ ServletRegistration servletRegistration = servletContext.getServletRegistration(SIGNAL_SERVLET_NAME);
if (servletRegistration == null) {
- throw new IllegalStateException("Servlet 'ProcessEngineSignal' expected to be registered.");
+ throw new IllegalStateException("Servlet '" + SIGNAL_SERVLET_NAME + "' expected to be registered (e.g. by web.xml).");
}
- servletRegistration.addMapping("/PEPSConnectorWithLocalSigning");
- servletRegistration.addMapping("/PEPSConnector");
+ addMapping(servletRegistration, "/PEPSConnectorWithLocalSigning");
+ addMapping(servletRegistration, "/PEPSConnector");
}
}