vipx / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Remapping Guice Servlet plugin modules with a uri-prefix #301

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For example, if you install a third party ServletModule that maps servlets to a 
URI that you already 
use, Guice Servlet should allow you to remap the third party module wholesale 
under a path-prefix:

install("/rpc/", new RpcModule());

Now, any servlet mappings in RpcModule are remapped with a path-prefix "/rpc/".

This is a fairly complex feature as it requires a good deal of thinking about 
regex mappings, path-
info rewriting and so forth. I don't think it will make it to 2.0.

Original issue reported on code.google.com by dha...@gmail.com on 4 Jan 2009 at 3:42

GoogleCodeExporter commented 9 years ago
Wouldn't this feature be easy if you use Warp Servlet within Warp Servlet. Like,
registering multiple dispatchers:
- GuiceFilter (/)
  - MyServlet1 (/1)
  - MyServlet2 (/2)
  - GuiceFilter (/rpc)
    - MyRpcServlet1 (/rpc/1)
    - MyRpcServlet2 (/rpc/2)

Then those remapped servlet now have a different root, that's all. They don't 
need to
care. Does that make sense?

Original comment by robbie.v...@gmail.com on 4 Jan 2009 at 12:44

GoogleCodeExporter commented 9 years ago
Yea this was my preliminary design. However, the implications are rather 
drastic--what happens when a servlet 
queries it's context path? Do we show the reduced path?

Do we also scope filters like this (makes sense to disambiguate servlets, but 
filters do not have a collision 
problem)? 

We need to gather more input around use cases. Perhaps I will start a thread on 
this.

Original comment by dha...@gmail.com on 4 Jan 2009 at 11:04

GoogleCodeExporter commented 9 years ago
Perhaps Greg Kick's new servlets SPI will address this...

Original comment by limpbizkit on 26 Apr 2009 at 9:43

GoogleCodeExporter commented 9 years ago

Original comment by sberlin on 19 Feb 2011 at 10:14