Java – clean up jetty – delete ‘unnecessary things’
I'm used to using jetty as my web container
What I did in the installation step was to get the original tar ball and clear some directories and files from it
What I want to put forward here is:
I change the default dock package:
>Delete:
> README. txt > pom. XML > Javadoc / > examples / > / webapps / test * > / contexts / test * > / project website > / resources / log4j properties
> CREATE:
>Work/
Question:
>Didn't I break any permits? > Can I bring any defects (performance / stability) to the system? > Does anyone order more on the dock? > Comments? > Question? > Tips?
Related articles:
> https://stackoverflow.com/questions/1486449/redistributing-jetty
Solution
correct.
The only drawback is that the log4j properties file is useful for controlling how many (or how many) logging is performed Disabling logging results in smaller log files, saving disk space (it should not be a TB drive problem.) If the record properties file cannot be found, the application may default to the debug or info level instead of the error level Therefore, log4j helps to inform all applications that only critical information is recorded
Eliminating irrelevant examples (test suites) enhances security by exposing less system information It also saves a little memory because the test webapps cannot be loaded into memory
You can clean up the webapps directory as follows:
cd /opt/jetty rm -rf webapps mkdir -p webapps/root echo "<html><body></body></html>" > webapps/root/index.html
Restart the dock