Skip to content
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

Use getServletPath instead of getPathInfo for jakarta servlets #198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kul
Copy link

@kul kul commented May 8, 2024

With jakarta servlet APIs getPathInfo returns null. getServletPath can be used as an alternative here.

https://stackoverflow.com/a/3745971/552525

@umairk79
Copy link
Collaborator

umairk79 commented May 9, 2024

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.

@kul
Copy link
Author

kul commented May 10, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants