简体   繁体   中英

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

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM