【发布时间】:2011-07-22 22:15:17
【问题描述】:
在我非常简单的 WebLogic 11g 应用程序中,我遇到了一个令人沮丧的虚拟目录映射问题。我安装了 WebLogic 11g OEPE,它安装了 WebLogic Server 10.35。我相信这是正确安装的,因为我能够部署一个运行良好的更复杂的应用程序......除了我的虚拟目录映射问题。
我想从 Web 应用程序之外的目录 H:\Backup 访问文件。
这是我的整个应用程序,这些是我的确切文件。
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>
当我访问 HTML 文件“http://localhost:7002/wl_test/index.html”时,它加载得非常好。
但是,当我尝试加载以下两个 URL 中的任何一个时,它们都失败并出现 HTTP 404 错误。是的,这两个文件 one.ini 和 asdf.txt 都存在于 H:\Backup 目录中。
- 'http://localhost:7002/wl_test/files/one.ini'
- 'http://localhost:7002/wl_test/asdf.txt'
这个简单的设置可能有什么问题?
我开始认为我不明白这应该如何工作。
【问题讨论】:
-
嗯...我在不同的系统上安装了一个服务器,当然它工作得很好。然后我从我的开发工作站删除服务器并重新安装它,它现在也可以工作了。我现在应该删除这个问题吗?
标签: weblogic