|Resource loading with HttpService [message #553322]
||Tue, 17 August 2010 03:41
Registered: August 2010
I am using HttpService to embbed a WebServer into Eclipse. But I am facing some issue when trying to read resources by using ServletContext#getResource.
I have following setup:
0. internal bundle structure
1. bundle classpath
Bundle-ClassPath: ./bin, ./resources
2. register resource
httpService.registerResource("/", "/WebContent", myHttpContext);
I want to get load resources by calling:
which returns null.
Instead I need to call the following to get the InputStream:
I expect the first one to work since I explicitly set the ressource mapping for alias "/" to "/WebContent". When I use ServletContext#getResource in plain WAR-enviroments like Tomcat this is working. So I am wondering whether there is any difference or whether I am missing something.
Do I miss something?
Powered by FUDForum
. Page generated in 0.01830 seconds