Skip to content

feat(ServletAdapter): Ability remove context path when get method name #11825

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

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

long76
Copy link

@long76 long76 commented Jan 14, 2025

Refs: #5066

Complex application may have many war-s and do not allow monopolize root context path(/). Add ability to remove context path(usual it's war name) from application server use @WebInitParam or just override getInitParameter for parameter GrpcServlet.REMOVE_CONTEXT_PATH

requestURI = contextPath + servletPath + pathInfo

Usage example:

@WebServlet(urlPatterns = "/*", asyncSupported = true,
        initParams = @WebInitParam(name = GrpcServlet.REMOVE_CONTEXT_PATH, value = "true"))
public class GrpcWebServlet extends GrpcServlet {
...
}

Links:
https://stackoverflow.com/a/42706412
https://coderanch.com/t/610432/certification/getContextPath-getServletPath-getPathInfo

long76 added 12 commits December 9, 2024 17:42

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Refs: grpc#5066

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@long76
Copy link
Author

long76 commented Jan 15, 2025

don't understand why crash tests) error in test env?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@long76
Copy link
Author

long76 commented Jan 29, 2025

don't understand why crash tests) error in test env?

found error - getInitParameter throw exception on tests

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Contributor

@kannanjgithub kannanjgithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a minor comment.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…variable initialization
kannanjgithub
kannanjgithub previously approved these changes Mar 11, 2025
@kannanjgithub kannanjgithub requested a review from ejona86 March 11, 2025 11:53
@kannanjgithub kannanjgithub added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Mar 12, 2025
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Mar 12, 2025
@kannanjgithub kannanjgithub dismissed their stale review March 12, 2025 06:56

Need a few more changes.

Copy link
Contributor

@kannanjgithub kannanjgithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more changes.

long76 added 2 commits March 12, 2025 10:15

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@long76 long76 requested a review from kannanjgithub March 12, 2025 07:35
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.

None yet

3 participants