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 war names that contain # symbol denoting sub path. #1359

Open
TonyWeston opened this issue Jul 4, 2019 · 4 comments
Open

Support war names that contain # symbol denoting sub path. #1359

TonyWeston opened this issue Jul 4, 2019 · 4 comments

Comments

@TonyWeston
Copy link

TonyWeston commented Jul 4, 2019

Tomcat supports contexts that have paths with many sub paths.

As you know, app.war will be deployed to context /app

However, it is also possible to deploy a war to a context that may have multiple sub paths.

app#sub1.war is deployed to context /app/sub1
app#sub2.war is deployed to context /app/sub2
app#sub2#abc.war is deployed to context /app/sub2/abc

Also versions of apps can be specified by using two hash's in the name
app##12.war is deployed to /app

See here for more details:
https://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Naming

Currently, psiprobe struggles with war files named this way.

@TonyWeston TonyWeston changed the title Support wars which contain # symbol denoting sub path. Support war names that contain # symbol denoting sub path. Jul 5, 2019
@hazendaz
Copy link
Member

hazendaz commented Jul 7, 2019

@TonyWeston Can you provide details as to what fails? This is vague at best so I need full description of what is not supported including stack traces. Also any pull request you can provide that fixes the situation is most appreciated. If my memory serves me, I thought we addressed this a couple years back so I'm not clear what the issue is with current release.

@TonyWeston
Copy link
Author

TonyWeston commented Jul 8, 2019

Ok, steps to reproduce, on Psiprobe 3.2.0 (built at 2018-12-20T22:06:41Z)

  1. Create the simpliest 'hello world' webapp, export it as app.war
  2. Deploy this in psiprobe, to verify it works as expected.
  3. Rename the war to app#sub1.war . deploy this in psiprobe.
  4. Psiprobe shows the error "/app#sub1 was not installed". However, it is actually deployed as shown in the Applications tab, and also /app/sub1/ responds as expected.
  5. Attempt to undeploy this app from Psiprobe applications tab
  6. Psiprobe returns no error, however /app/sub1 is not undeployed.

@TonyWeston
Copy link
Author

Feel free to use this war file for test purposes.

app#sub1.zip

@wlusink
Copy link

wlusink commented May 20, 2022

I have the issue with the two hash marks for the version.
When I deploy a file like app##1.0.war in the apache manager, it will be deployed to /app and in the manager it will show 1.0 in the version column.
When I try to deploy app##1.1.war in the apache manager, it will fail, saying that there is already an application at /app.

However, in psi probe, when I first deploy app##1.0.war, the app will be deployed to /app, but in psi probe its name will be app##1.0.war, and the link will be /app##1.0. The link will open the application because of the hash in the link.
Then, when I deploy app##1.1.war in psi probe, it will deploy this app alongside the app##1.0.war.
When I now look in manager, I have these two applications installed alongside each other, but there is only one link, namely /app.

As a solution, I think it would be good if psi probe would implement the ##version naming convention. And also show this version in the Applications tab. Exactly like in the apache manager.

How else can I see an application's version number in psi probe?

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

No branches or pull requests

3 participants