My Quotes

When U were born , you cried and the world rejoiced
Live U'r life in such a way that when you go

Wednesday, October 21, 2009

Reduce the EAR file size by trimming the WEB-INF\LIB folder jars

  • In my previous blog I said of removing the jar files basically from the APP-INF\lib.
  • But most of us want to remove the JAR files from the WEB-INF\LIB folder also just in case to truncate the EAR to the maximum possible extent.
  • How many of us will and have hindered this exception as "the path of the URI is wrong or no reference to the TLD" etc., etc.,
  • When you google it the best way is to add up the jar files like struts.jar into the WEB-INF\LIB and deploy the app and you are safe.
  • doing this actually increase the size of the ear and it does not really solve our problem at hand.
  • did not help a lot and I understood that many people have this problem at hand and there was no definitive answer.
  • here is a way to get rid of this also. Again this I tried in weblogic and there should be a way to accomplish this with other application servers too.

    Here are the steps to perform this reduction.
    Copy all the necessary TLD of the COTS jar files into a location in your workspace say WEB-INF\tld
    Change the web.xml to have the references to the TLD files
    By default you can remove these jar files from the WEB-INF\LIB folder.
    Ensure that you have deployed these JAR files as LIBRARY into the application server
    Generate the EAR file and you should see happy smiles on the deployer.
  • No comments :