Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » HttpService: getRequestDispatcher returns null for different httpContext
HttpService: getRequestDispatcher returns null for different httpContext [message #62486] Wed, 22 February 2006 22:46
Harald Niesche is currently offline Harald NiescheFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

I am trying to use the equinox HttpService and I stumbled about this:

In the equinox ServletContext implementation, a RequestDispatcher is
only returned from servletContext.getRequestDispatcher() if it stays
within the same HttpContext.

(line 196 in ServletContextImpl:)
if (httpContext != reg.getHttpContext()) {
return (null);
}

The only thing I can find about this in OSGi spec is that all servlets
registered using the same HttpContext share the same ServletContext.

The servlet API says that getRequestDispatcher can only return a
RequestDispatcher for the same ServletContext, but it also suggests
using getContext() to obtain a RequestDispatcher for another context,
but in the HttpService they all have the same contextPath ... and the
ServletContextImpl won't return a context for another HttpContext, either.

I don't believe the bridge servlet ProxyServlet currently has this
limitation (although it doesn't implement getContext() correctly if I
try to look up my own context).

Unfortunately, while being perfectly legal under all the specifications
concerned, this behaviour seriously limits the usefulness of the
getRequestDispatcher() method if we want to build modular webapps with
equinox.

Is allowing access to another HttpContext really a horrible security
risk? Would it at least be possible to make this configurable?

Harald
Previous Topic:Exporting a package from a jar library in a plugin's classpath.
Next Topic:general purpose server-side OSGi
Goto Forum:
  


Current Time: Thu Apr 25 03:32:27 GMT 2024

Powered by FUDForum. Page generated in 0.02558 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top