вт, 27 июл. 2021 г. в 17:36, Noelette Stout <noelettest...@isu.edu>:
>
> We have an application that needs to have files added to WEB-INF/classes
> each time it's deployed. Without getting into a long story about why we're
> doing things in sub-optimal ways, I need to know if there's a way to run a
> script that would add these files when deploying with the HTML manager. Any
> ideas are appreciated. If the answer is to manually run the script from the
> command line then reload, I can accept that too.
>

Generally,
if you can make changes in your web application

1) PreResources element (with webAppMount="/WEB-INF/classes") can be
used to inject external files into a web application.

https://tomcat.apache.org/tomcat-9.0-doc/config/resources.html

2) A listener can be configured in a web application to do some work
when the web application starts up.

Either at Tomcat level (e.g. at Context), or with standard Servlet API.

https://tomcat.apache.org/tomcat-9.0-doc/config/listeners.html

https://tomcat.apache.org/tomcat-9.0-doc/servletapi/javax/servlet/ServletContextListener.html
https://tomcat.apache.org/tomcat-9.0-doc/servletapi/javax/servlet/ServletContainerInitializer.html

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to