HttpContext outside of plugin bundle [message #546460] |
Mon, 12 July 2010 21:33 |
Brett Meyer Messages: 3 Registered: July 2010 Location: Fort Wayne, IN |
Junior Member |
|
|
Hello! Thanks in advance for any info available...
We're trying to figure out how to create a Jetty HttpService allowing access outside of all plugin bundle contexts.
More specifically, multiple plugins are able to store video files into C:\eclipse\uploads. All videos need to be served-up as resources, using something like <server>.registerResources("/uploads", "C:\eclipse\uploads", ???);
I realize this might effectively create a context exposing all of the filesystem...
We've looked extensively for examples and aren't having much luck. Can anyone shed some light on it? Thanks again!
[Updated on: Mon, 12 July 2010 21:43] Report message to a moderator
|
|
|
|
|
Re: HttpContext for all of filesystem [message #546750 is a reply to message #546630] |
Wed, 14 July 2010 05:50 |
|
Am 13.07.2010 17:13, schrieb Brett Meyer:
> 1.) When we init ResourceServlet, what ServletConfig do we give it that would allow external FS access?
No special config. It will be set by the HttpService when you register
the servlet.
> 2.) I see ResourceServlet doing this: String resourcePath = internalName + httpRequest.getPathInfo();
> Does this mean we should initialize it with internalName as, for instance, "C:\eclipse\uploads"?
You need to modify the implementation. #writeResource still calls
ServletContext#getResource. You simply need a #writeResource
implementation that reads the file directly from your file-system location.
-Gunnar
--
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02903 seconds