Skip to main content

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

Thanks Simon for that fast answer! It works!

Emmanuel

-----Message d'origine-----
De : equinox-dev-bounces@xxxxxxxxxxx
[mailto:equinox-dev-bounces@xxxxxxxxxxx] De la part de Simon Kaegi
Envoyé : 19 mars 2008 12:50
À : Equinox development mailing list
Objet : Re: [equinox-dev] Servlet mapping

Hi Emmanuel,

Just register with "/messagebroker".
The OSGi HttpService handles URI registration a little bit differently and
looks for the longest matchng alias.
"*" handling is not specified by the Http Service however the intent in
this case seems pretty obvious so we maybe can add it in the Equinox
implementation.

-Simon

equinox-dev-bounces@xxxxxxxxxxx wrote on 03/19/2008 01:37:05 PM:

> 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
>  _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top