Вопрос

I saw a good tutorial on Servlets with BNDtool here: http://www.ralfebert.de/tutorials/osgi_server/.

But how could I access static html-documents and JSPs from this Servlet? Where should I store them when I'd like to get them with request.getRequestDispatcher("*.jsp")?

Это было полезно?

Решение

Have a deeper look to HttpService#registerResource. An appropriate implementation comes with Apache Felix HttpService. That should solve your problem in a programmatically way. Unfortunality, I don't now any declarativ one.

UPDATE: Listing 7 on this page gives you an overview how to use it. The rest of this article is used with the Equinox framework.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top