tag “lib”
deploy war file without lib in Tomcat
by Hamid Reza Fahimi Madjd @ Dec 12, 2007
At this post I'd talk about how to decrease size of big war files and make deployment faster.
I have a 15 MB war file and the size of lib (jar files) directory is 14.8 MB! So I need a solution that enables me to upload my project lib directory just for once and after that deploy my war file without lib directory.
At first I renamed my lib directory to myprojlib and then copied (for example using ftp) it to ${tomcat home}/common/lib folder on the server.
After that I modify catalina.properties file in ${tomcat home}/conf and add my myprojlib path to common.loader according below:
common.loader=${catalina.home}/common/classes, ${catalina.home}/common/i18n/*.jar, ${catalina.home}/common/endorsed/*.jar, ${catalina.home}/common/lib/*.jar, ${catalina.home}/common/lib/myprojlib/*.jar
After that I remove lib folder from my project and compile it without lib directory. Be careful don't package jar files in your project. My war file is 180KB now and I deploy it easily and I shouldn’t deploy 15 MB war file every time.
java, lib, tomcat, war file no comment
recent posts
- › how to use phing to build php projects
- › slice/paging large contents using php
- › how to log methods call in php ?
- › sql IN logical operation for java
- › backup from mysql database's routines
- › how to deploy war file into web root ?
- › how to get all oracle components version ?
- › temporary/memory tables in mysql
- › Set JFreeChart data from database
- › How to search and sort primitive arrays in Java ?
archive
- › 2011/06 (1)
- › 2010/11 (1)
- › 2010/10 (1)
- › 2009/04 (2)
- › 2008/05 (1)
- › 2008/03 (1)
- › 2008/01 (4)
- › 2007/12 (4)
last tweet
- ›