1、不加项目名称,直接访问虚拟目录下的文件:配置如下。详细你懂的 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd"> <context-root>/</context-root> <session-descriptor> <cookie-http-only>false</cookie-http-only> </session-descriptor> <virtual-directory-mapping> <local-path>D:/doc</local-path> <url-pattern>/docfile/*</url-pattern> </virtual-directory-mapping> <virtual-directory-mapping> <local-path>D:/doc</local-path> <url-pattern>/uploadFile/*</url-pattern> </virtual-directory-mapping> </weblogic-web-app> 这样配置后就可以,直接访问了,地址如下:http://localhost/docfile/20120606100800.txt 2、访问路径带项目名称,访问时需要加上项目的名称,才能访问到,配置如下: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd"> <context-root>/</context-root> <session-descriptor> <cookie-http-only>false</cookie-http-only> </session-descriptor> <virtual-directory-mapping> <local-path>D:/</local-path> <url-pattern>/docfile/*</url-pattern> </virtual-directory-mapping> <virtual-directory-mapping> <local-path>D:/</local-path> <url-pattern>/uploadFile/*</url-pattern> </virtual-directory-mapping> </weblogic-web-app> 这样配置后就可以,直接访问了,地址如下:http://localhost/这里写你的工程名/docfile/20120606100800(1).txt。 3、这种和第一种是一样的 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd"> <context-root>/</context-root> <session-descriptor> <cookie-http-only>false</cookie-http-only> </session-descriptor> <wls:context-root>webtest</wls:context-root> <wls:virtual-directory-mapping> <wls:local-path>d:/cq</wls:local-path> <wls:url-pattern>/images/*</wls:url-pattern> <wls:url-pattern>*.jpg</wls:url-pattern> </wls:virtual-directory-mapping> </weblogic-web-app>
详细解决方案
weblogic配备虚拟目录
热度:168 发布时间:2013-07-09 09:50:47.0
相关解决方案
- webLogic,该怎么解决
- weblogic API 怎么上载
- weblogic 12c 怎么配置一般数据源
- weblogic 调度项目出错
- weblogic 文件下载有关问题
- Weblogic Native IO 有关问题一则
- 百分求解:在vs2005中.net项目发布到IIS 6下(虚拟目录)但是浏览的时候提示没有访问权限。解决办法
- apache,weblogic,websphere这些web服务器,能用asp或asp.net吗?解决办法
- [高手]weblogic server 启动怎么不去部署以前部署过的项目
- weblogic 8.1 公布的应用程序每天老死掉! 在哪里看到日志关于死掉的原因
- 安装BEA.WebLogic.Server.9.1.for.Windows出现的有关问题
- weblogic 健康检查解决方法
- WebLogic Server/Express 8.1 with SP4便是weblogic9.0么
- weblogic 8.1 公布的这样很SQL到数据库 它为什么呢
- weblogic Adminserver起步后,console无法登录
- weblogic lisence.bea,该如何解决
- WEBLOGIC 上部署war
- WEBLOGIC 十 域的创建
- weblogic 端口有关问题
- 小弟我想问一上,用 WEBLOGIC 好,还是 WEBSPHERE好,还是JBUILDER好
- weblogic 监测,jmx,请求
- weblogic 运行几天突然关闭有关问题
- weblogic 8.1初学者级有关问题:关于setWLSEnv.cmd中的classpath
- WebLogic 中JSP标签嵌套有关问题
- weblogic 许可替换有关问题
- 请大家帮忙,“weblogic.servlet.jsp.CompilationException”出现这样的异常,是咋回事
- WEBLOGIC 10 域的创建解决方法
- weblogic 8.1 发布的这样很SQL到数据库 它为什么呢?该怎么处理
- WEBLOGIC 下部署war,该怎么解决
- weblogic 健康检查,该怎么处理