-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forwarding to Servlet Broken w/ Parameters #379
Comments
From dhanji on June 26, 2009 18:08:45 Is this even legal in the servlet spec? Note to self: check the servlet spec for RequestDispatcher. |
From sberlin on February 21, 2011 17:41:31 (No comment was entered for this change.) Labels: Extension-Servlet |
From nick.lothian on May 20, 2011 21:54:52 It is legal according to the servlet spec. In 2.4 (which is what I happened to have) it says: SRV.8.1.1 Query Strings in Request Dispatcher Paths String path = “/raisins.jsp?orderno=5”; Parameters specified in the query string used to create the RequestDispatcher |
From arman.vartan on April 11, 2014 05:16:43 This issue is similar to https://code.google.com/p/google-guice/issues/detail?id=372 , but is not fixed by it... Simple example: * Create a GuiceServletContextListener with
* Guice: Requesting any url will go through Filter1, but won't call doGet on Servlet1
In our real-world use-case, we currently utilize the urlrewritefilter and have rules like: |
From sberlin on April 11, 2014 06:00:12 Patches with tests are gladly accepted. |
From arman.vartan on April 11, 2014 10:39:45 In principle the UriPatternType.SERVLET matcher works as specified in the servlet-3.0 specs 12.2. As for the matter of matching a filter/servlet, my patch will create an URI object out of the uri string and check against the path. Attachment: gist |
From sberlin on April 11, 2014 12:34:41 Thanks for the patch! I'm very wary of putting a java.net.URI in the critical path. It's not very forgiving in terms of throwing exceptions on certain inputs, and it's a bit heavyweight in construction. |
From arman.vartan on April 11, 2014 17:45:19 I guess a cheaper implementation is just to strip out the fragment and query. Attachment: gist |
From sberlin on May 02, 2014 21:54:35 fixed by r269f2f69279d Status: Fixed |
From stevekeogh on May 29, 2009 03:13:57
I believe there is a bug in Guice-Servlet when grabbing a RequestDispatcher
to a servlet served by Guice.
For example:
with: serve("/download").with(DownloadServlet.class);
request.getRequestDispatcher("/download") will return a
ManagedServletPipeline and forwarding with this dispatcher functions correctly.
however request.getRequestDispatcher("/download?
code=3vif9&msisdn=46733710212&language=sv") returns an
ApplicationDispatcher and forwarding results in a 404 error.
This issue is discussed in more detail here: http://groups.google.com/group/google-guice/browse_thread/thread/597d1cfbc2017722
Original issue: http://code.google.com/p/google-guice/issues/detail?id=379
The text was updated successfully, but these errors were encountered: