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

Support additional context paths #5156

Merged
merged 2 commits into from
Jan 25, 2024
Merged

Support additional context paths #5156

merged 2 commits into from
Jan 25, 2024

Conversation

labkey-jeckels
Copy link
Contributor

Rationale

Some server configurations have historically used non-root context paths, and/or deployed additional web apps for delivering static content.

Related Pull Requests

Changes

  • Property to control LabKey's context path: context.contextPath
  • Property to automatically redirect/forward requests from a legacy context path to the root: context.legacyContextPath
  • Properties to deploy extra web apps: webapps.contextPath and webapps.docBase

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hah, IntelliJ had helpfully collapsed this section so I hadn't noticed it. I started with a redirector servlet that I wrote many years ago but I think the source code got lost in the SVN->GitHub migration. I still had the binaries in email though.

{
if (!legacyContextPath.startsWith("/") || legacyContextPath.length() < 2)
{
throw new IllegalArgumentException("Invalid legacy context path: " + legacyContextPath);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this error message use the property name to make it easier to track down where the error is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@labkey-jeckels labkey-jeckels merged commit 1ba37bb into tomcat10 Jan 25, 2024
7 of 8 checks passed
@labkey-jeckels labkey-jeckels deleted the tc10_contextPaths branch January 25, 2024 06:08
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