Monday, April 6, 2009

Direct file access in weblogic server

In weblogic, you can keep a directory for all images,pdfs,....

how to do ...

------------

you have to create a "weblogic.xml" file in WEB-INF in your application. This weblogic.xml should be like this.

<?xml version="1.0" encoding="UTF-8"?>

<weblogic-web-app>

<virtual-directory-mapping>

<local-path>/apps/test</local-path>

<url-pattern>/images/*</url-pattern>

</virtual-directory-mapping>

</weblogic-web-app>



suppose you have a directory called as images in path /apps/test/images. You can give users to direct access those files as follows.

http://localhost/AppName/images/test.jpeg;


This is called as Virtual directory mapping in weblogic.

No comments:

Post a Comment