Frage

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")?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top