Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accidentally deleted tomcat `webapps` folder

I have accidentally deleted the webapps folder in tomcat. I had 2 web applications there deployed as .war files and the default tomcat folder, "Root", "manager", "host-manager", "examples" and "docs".

Since I am on cloud amazon EC2 instance (ubuntu) and I have no use of tomcat manager, can I simply create a new directory manually called webapps and copy and paste the .war files of my projects?

Will this work or is this subjected to break something at some point?

like image 445
PeakGen Avatar asked Feb 26 '26 18:02

PeakGen


1 Answers

Absolutely yes, your apps will be automatically deployed again after some seconds.

Moreover, you can download those Root, manager, host-manager, examples and docs folders from the tomcat distribution, and copy them into your webapps directory. The manager and host-manager apps will restart automatically.

Since the configuration to access manager and host-manager is inside conf/tomcat-users.xml, it has not been deleted. So the apps will work like previously, without any change.

like image 151
Alexandre Fenyo Avatar answered Mar 01 '26 10:03

Alexandre Fenyo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!