Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Servlet mapping

I want to reproduce this servlet installation for Blaze DS (for what is not important) inside a bundle :

 

    <servlet>

        <servlet-name>MessageBrokerServlet</servlet-name>

        <display-name>MessageBrokerServlet</display-name>

        <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>

        <init-param>

            <param-name>services.configuration.file</param-name>

            <param-value>/WEB-INF/flex/services-config.xml</param-value>

       </init-param>

        <load-on-startup>1</load-on-startup>

    </servlet>

 

In the root of my bundle, I copied the flex directory and add this code in my activator start method :

 

HttpServlet messageBrokerServlet = new MessageBrokerServlet();

           

Hashtable<String, String> initParams = new Hashtable<String, String>();

initParams.put("services.configuration.file", "/flex/services-config.xml");

           

httpService.registerServlet("/messagebroker/*", messageBrokerServlet, initParams, httpService.createDefaultHttpContext());

 

And it works!!

 

The problem is that I can’t access the servlet with /messagebroker/anything. I have to explicitely call /messagebroker/*. That’s the only way for my servlet to get called.

 

I did some tests like aliasing with « /messagebroker/*.jsp » and it worked. I can access it with /messagebroker/anything.jsp as it would work as with a classic web.xml configuration… is that a bug?

 

Emmanuel

 


Back to the top