Use getServletPath instead of getPathInfo for jakarta servlets#198
Use getServletPath instead of getPathInfo for jakarta servlets#198kul wants to merge 1 commit intoNetflix:mainfrom
Conversation
|
Can we add another builder method for getServletPath() instead of modifying the current one? getPathInfo() and getServletPath() return different outputs based on the url structure and cannot be used as a direct replacement. The new method can also be added to the non jakarta module. |
|
@umairk79 apologies for the confusion, I was working with spring 6 upgrade and converting a servlet to controller some time back, and somehow thought this was due to jakarta thus changed the method itself in jakarta module. Yes, changing byPath method itself does not make sense. I have taken another attempt at it by giving the user independence on whatever way he would like to implement the bypassing and partition by consuming thw whole request context. Please have a look and let me know your thoughts. |
With jakarta servlet APIs getPathInfo returns null. getServletPath can be used as an alternative here.
https://stackoverflow.com/a/3745971/552525