xmlrpcservlet does not accept additional init params
This commit is contained in:
parent
71fb0ad06b
commit
c533e75061
@ -11,6 +11,14 @@
|
||||
<servlet>
|
||||
<servlet-name>Queue Status Servlet</servlet-name>
|
||||
<servlet-class>de.hsadmin.core.qserv.QueueStatusReceiverServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>proxyValidateUrl</param-name>
|
||||
<param-value>https://@LOGIN_HOST@:@LOGIN_PORT@/cas/proxyValidate</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>proxyServiceUrl</param-name>
|
||||
<param-value>https://@CONFIG_HOST@:@CONFIG_PORT@/hsar/backend</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
@ -21,14 +29,6 @@
|
||||
<param-name>enabledForExtensions</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>proxyValidateUrl</param-name>
|
||||
<param-value>https://@LOGIN_HOST@:@LOGIN_PORT@/cas/proxyValidate</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>proxyServiceUrl</param-name>
|
||||
<param-value>https://@CONFIG_HOST@:@CONFIG_PORT@/hsar/backend</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
|
@ -11,6 +11,14 @@
|
||||
<servlet>
|
||||
<servlet-name>Queue Status Servlet</servlet-name>
|
||||
<servlet-class>de.hsadmin.core.qserv.QueueStatusReceiverServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>proxyValidateUrl</param-name>
|
||||
<param-value>https://@LOGIN_HOST@:@LOGIN_PORT@/cas/proxyValidate</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>proxyServiceUrl</param-name>
|
||||
<param-value>https://@CONFIG_HOST@:@CONFIG_PORT@/hsar/backend</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
@ -21,14 +29,6 @@
|
||||
<param-name>enabledForExtensions</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>proxyValidateUrl</param-name>
|
||||
<param-value>https://@LOGIN_HOST@:@LOGIN_PORT@/cas/proxyValidate</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>proxyServiceUrl</param-name>
|
||||
<param-value>https://@CONFIG_HOST@:@CONFIG_PORT@/hsar/backend</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
|
@ -18,12 +18,14 @@ import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
import javax.naming.NamingException;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import de.hsadmin.core.model.TechnicalException;
|
||||
import de.hsadmin.core.model.TicketValidator;
|
||||
import de.hsadmin.core.model.Transaction;
|
||||
import de.hsadmin.core.util.Config;
|
||||
|
||||
@ -43,6 +45,10 @@ public class QueueStatusReceiverServlet extends HttpServlet
|
||||
|
||||
@Override
|
||||
public void init() throws ServletException {
|
||||
final ServletConfig cfg = getServletConfig();
|
||||
final String validateURL = cfg.getInitParameter("proxyValidateUrl");
|
||||
final String serviceURL = cfg.getInitParameter("proxyServiceUrl");
|
||||
TicketValidator.getInstance().initialize(validateURL, serviceURL);
|
||||
isConnected = false;
|
||||
messageCount = 0;
|
||||
errorCount = 0;
|
||||
|
@ -1,28 +1,15 @@
|
||||
package de.hsadmin.remote;
|
||||
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import org.apache.xmlrpc.XmlRpcException;
|
||||
import org.apache.xmlrpc.metadata.XmlRpcSystemImpl;
|
||||
import org.apache.xmlrpc.server.PropertyHandlerMapping;
|
||||
import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
|
||||
import org.apache.xmlrpc.webserver.XmlRpcServlet;
|
||||
|
||||
import de.hsadmin.core.model.TicketValidator;
|
||||
|
||||
public class HSXmlRpcServlet extends XmlRpcServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void init() throws ServletException {
|
||||
super.init();
|
||||
final ServletConfig cfg = getServletConfig();
|
||||
final String validateURL = cfg.getInitParameter("proxyValidateUrl");
|
||||
final String serviceURL = cfg.getInitParameter("proxyServiceUrl");
|
||||
TicketValidator.getInstance().initialize(validateURL, serviceURL); }
|
||||
|
||||
@Override
|
||||
protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
|
||||
throws XmlRpcException {
|
||||
|
Loading…
Reference in New Issue
Block a user