[HTTPService] dynamic servlet mapping

View: New views
2 Messages — Rating Filter:   Alert me  

[HTTPService] dynamic servlet mapping

by fabien.couble :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm trying to use the standard OSGI HTTP service for a oscar based application but I'm faced to a problem. In fact, I have to create a servlet with a dynamic URL i.e. whatever URL is called (http://x.x.x.x/hi or http://x.x.x.x/bye) I want to call the same servlet. Moreover the point is I can't predict the URL.
Do you know if it is possible to create dynamic servlet mapping with the standard HTTP service or do I have to implement my own HTTP service?

Thx for your reponses...
Regards
Fabien



--
You receive this message as a subscriber of the oscar@... mailing list.
To unsubscribe: mailto:oscar-unsubscribe@...
For general help: mailto:sympa@...?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

Re: [HTTPService] dynamic servlet mapping

by Richard S. Hall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It sounds like this should be possible if you read the HTTP Service spec:

The Http Service must repeat this process until either a match is found or
the sub-string is an empty string. If the sub-string is empty and the
alias "/"
is registered, the request is considered to match the alias "/".
Otherwise, the
Http Service must return HttpServletResponse.SC_NOT_FOUND(404) to
the client.

For example, an HTTP request comes in with a request URI of "/fudd/bugs/
foo.txt", and the only registered alias is "/fudd". A search for
"/fudd/bugs/
foo.txt" will not match an alias. Therefore, the Http Service will
search for
the alias "/fudd/bugs" and the alias "/fudd". The latter search will
result in a
match and the matched alias registration must be used.

-> richard


fabien.couble@... wrote:

> Hi all,
>
> I'm trying to use the standard OSGI HTTP service for a oscar based application but I'm faced to a problem. In fact, I have to create a servlet with a dynamic URL i.e. whatever URL is called (http://x.x.x.x/hi or http://x.x.x.x/bye) I want to call the same servlet. Moreover the point is I can't predict the URL.
> Do you know if it is possible to create dynamic servlet mapping with the standard HTTP service or do I have to implement my own HTTP service?
>
> Thx for your reponses...
> Regards
> Fabien
>
>  


--
You receive this message as a subscriber of the oscar@... mailing list.
To unsubscribe: mailto:oscar-unsubscribe@...
For general help: mailto:sympa@...?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
LightInTheBox - Buy quality products at wholesale price!