You are not logged in.

#1 2024-03-05 07:47:09

tachtler
Member
Registered: 2020-08-23
Posts: 38

[solved] - Tomcat update overrides webapps/ROOT application

Hi,

I deploy my web application as ROOT.war in tomcat9.

However, with every  update of tomcat9 the directory

/var/lib/tomcat9/webapps

and all web applications contained therein are also redeployed, which means that my web application is overwritten.

Under CentOS, this problem was solved by excluding the ROOT and sample web applications in a separate RPM package.

Does anyone have the same problem under Archlinux and if so, how was it solved?

Thanks and regards
Klaus.

Last edited by tachtler (2024-03-05 09:57:59)

Offline

#2 2024-03-05 08:47:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,372

Re: [solved] - Tomcat update overrides webapps/ROOT application

I'd deploy my actual application under it's actual name and instead reconfigure the Context path root to point there.

If you're dead set in overriding the ROOT path instead: https://wiki.archlinux.org/title/Pacman … _to_system

Offline

#3 2024-03-05 09:47:55

tachtler
Member
Registered: 2020-08-23
Posts: 38

Re: [solved] - Tomcat update overrides webapps/ROOT application

Hi V1del,

thank you for the link, I will try this good idea!

Greetings
Klaus.

Offline

#4 2024-03-05 09:57:40

tachtler
Member
Registered: 2020-08-23
Posts: 38

Re: [solved] - Tomcat update overrides webapps/ROOT application

Hi V1del,

configure the following parameter inside

/etc/pacman.conf

will solve my little problem:

[options]
...
NoExtract=var/lib/tomcat9/webapps/ROOT/*
...

Thank you again!
Klaus.

Offline

#5 2026-09-08 16:52:36

olafk
Member
Registered: 2026-09-08
Posts: 1

Re: [solved] - Tomcat update overrides webapps/ROOT application

The suggestions here (NoExtract in pacman) do work, but it's an unusual use case to have the demo web applications deployed on any production server. This applies to all tomcat versions (9, 10, 11).
It'd be a more user-friendly way to package Tomcat without the stock webapps, and instead provide the webapps as a separate package that's optional to install for the few who want them. At least this wouldn't result in a surprise data-loss or data-destruction at random times when tomcat updates and before this thread is found and acted on.

My problem now is neatly solved by this, but I'd prefer if the default install was less prone to destroying data that's meant to be changed in a system like Tomcat. To compare: I don't have to re-provide my website content after an update of httpd or nginx... it's the same situation here.

Offline

#6 2026-09-08 18:59:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,372

Re: [solved] - Tomcat update overrides webapps/ROOT application

You don't have to reprovide your application either if you just pick an appropriately dedicated name, it seems weird to me to abuse the package owned ROOT for this that's visibly being used by the default package.

In any case, if you want this acted upon, please open up a feature request against the tomcat packages on the gitlab with your relevant reasoning so that the packagers see it.

Closing this old thread. -- https://wiki.archlinux.org/title/Genera … bumping%22

Last edited by V1del (2026-09-08 19:00:35)

Offline

Board footer

Powered by FluxBB