SRobertJames
SRobertJames

Reputation: 9198

How to set a WAR overlay targetPath for ZIP overlay?

In a java project, I have a ZIP overlay that I'd like to set the targetPath for. The docs say only WAR is supported, not ZIP. How do you set the targetPath of jar overlay in a war? indicates that JAR is also supported. Regardless, I've tested the ZIP and targetPath in the POM seems to be ignored.

Is there a way to set the targetPath for a ZIP overlay?

UPDATE

To clarify:

  1. The WAR overlay serves content as `/X...'
  2. I want it served as /abc/X...
  3. I thought the way to do that was via targetPath
  4. If there's another way to do it, please let me know

UPDATE 2

I'm including a WAR as an overlay. It works fine. It serves "http://myapp.com/x/y/z.js" beautifully.

But, I'd like it to serve that same content at "http://myapp.com/MYPREFIX/x/y/z.js".

Upvotes: 1

Views: 85

Answers (1)

jimnz111
jimnz111

Reputation: 116

If it’s just the one prefix path, you should be able to use the web context for that. Almost all war deployment environments I’ve worked with support it - even spring boot. What web server is it being deployed under?

Upvotes: 0

Related Questions