diff options
Diffstat (limited to 'id/server/modules/module-stork/src/main/java')
-rw-r--r-- | id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java | 19 |
1 files changed, 15 insertions, 4 deletions
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");
}
}
|