U
U
UltimateOrb2015-04-17 20:35:37
JavaScript
UltimateOrb, 2015-04-17 20:35:37

Tomcat and autodeploy. How to implement correctly?

There is a web application project under tomcat. Using maven and gitlab ci did autodeploy to a remote server when committing to the master branch. The problem is that when autodeploy happens, servlets are always re-initialized, sessions are reset. When there are changes in java files this is normal, but if only html/js files are edited, this behavior is not appropriate.
How to properly organize a repository for such a project? Perhaps you need 2 repositories, one for the java part, the other for html/js/css/image, but how then to properly organize the deployment?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Smirnov, 2015-04-23
@bobzer

As an option - deploy the application in an unpackaged form, i.e. it must be a folder (for example, ROOT) in which the application structure is located in the form of folders and files. With this approach, there will be no re-deploy at all (even if the servlet classes have changed).
In general, redeploying a Java application "hot" is a dangerous practice. Here, there can be problems with class versioning, and with memory leaks, and the devil knows what else. Personally, I use redeploy "hot" exclusively on test servers...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question