11 August 2011

weblogic.xml and prefer-application-packages

Short and sweet this one, purely for my own future simple reference.

To use prefer-application-packages in weblogic.xml, it looks like this:
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">

  <jsp-descriptor>
    <keepgenerated>true</keepgenerated>
    <debug>true</debug>
  </jsp-descriptor>

  <context-root>/quicktest</context-root>
  
  <container-descriptor>
    <prefer-application-packages>
        <package-name>org.codehaus.jackson.*</package-name>
        <package-name>org.codehaus.jettison.*</package-name>
        <package-name>org.objectweb.asm.*</package-name>
    </prefer-application-packages>
  </container-descriptor>

</weblogic-web-app>