Sunday, 25 September 2016

Weblogic Virtual Path Directory config for Static images etc


Using the below configuration you can basically create a content repository for your application using the feature provided by weblogic to host static content .

for example below your application context is webApp

Hence static will be hosted at IP:Port/webApp/image.jpg

<wls:weblogic-web-app xmlns:wls="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.3/weblogic-web-app.xsd">
    <wls:weblogic-version>10.3.4</wls:weblogic-version>
    <wls:context-root>webApp</wls:context-root>
    <wls:container-descriptor>
                   <!-- virtual directory -->
         <wls:index-directory-enabled>true</wls:index-directory-enabled>
         <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
           
    </wls:container-descriptor>
  
     <!-- virtual directory -->
         <wls:virtual-directory-mapping>
           <wls:local-path>/deployment/static</wls:local-path>
               <wls:url-pattern>*</wls:url-pattern>
         </wls:virtual-directory-mapping>
 
</wls:weblogic-web-app>

No comments:

Post a Comment

AWS Certificate Manager - Import Certificate

How to import a certificate. Use Key Store Explorer to open the cert and export keypair in PEM format  This will save a file cert.pem. Make ...