views:

93

answers:

1

Hi all, Is there a folder in the Domain Directory of Weblogic, where files put inside can be accessed directly from web browser? In other word, I don't have to pack the file in an ear, war file and deploy it to make it accessible? Thank you very much Regards K.

A: 

The Virtual Directory Mapping feature (that you declare in the weblogic.xml) would do the trick:

Using the virtual directory mapping feature, you can create one directory to serve static files such as images for multiple Web Applications. For example, you would create a mapping similar to the folowing:

<virtual-directory-mapping>
  <local-path>c:/usr/gifs</local-path>
  <url-pattern>/images/*</url-pattern>
</virtual-directory-mapping>

A request to http://localhost:7001/mywebapp/images/test.gif will cause your WebLogic Server implementation to look for the requested image at: c:/usr/gifs/images/*.

This directory must be located in the relative uri, such as "/images/test.gif".

Pascal Thivent