I am having a frustrating problem with virtual directory mapping in my very simple WebLogic 11g application. I installed WebLogic 11g OEPE, which installs WebLogic Server 10.35. I believe that this is installed correctly, because I am able to deploy a much more complicated application that is working fine…except for my issue with virtual directory mapping.
I want to access files from a directory outside of the web application, H:\Backup.
Here is my entire application, and these are my exact files.
wl_test/index.html
<html>
<head><title>WebLogic Test</title></head>
<body>
<h1>This is another new test<br>
</body>
</html>
wl_test/WEB-INF/web.xml
<web-app>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
wl_test/WEB-INF/weblogic.xml
<weblogic-web-app>
<virtual-directory-mapping>
<local-path>H:/Backup/</local-path>
<url-pattern>/files/*</url-pattern>
<url-pattern>*.txt</url-pattern>
</virtual-directory-mapping>
</weblogic-web-app>
When I access the HTML file, ‘http://localhost:7002/wl_test/index.html‘, it loads perfectly fine.
However when I attempt to load either of the following two URLs, they both fail with a HTTP 404 error. And yes, both of those files, one.ini and asdf.txt exist in the H:\Backup directory.
What could be wrong with this trivial setup?
I’m beginning to think I don’t understand how this is supposed to work.
I think I understand what has changed and how to fix everything.
There were two problems with the virtual directory mapping.
First, the local-path cannot be a MS-DOS SUBSTed drive. I don’t understand why, but WebLogic doesn’t like it.
Second, when the url-pattern contains a folder, like /files/*, that folder must exist in the local-path directory.
Both of these are allowed in the JRun server that this is being ported from.
Sigh,
Randy Stegbauer