migrate from weblogic to tomcat: directory mapping--reference
Question:
I am trying to migrate from weblogic to tomcat. in weblogic I have
<virtual-directory-mapping>
<local-path>E:/internal</local-path>
For example I have mysite project. It means that localhost:8080/mysite/ = E:/internal and I can get a file from E:/internal through localhost:8080/mysite/
localhost:8080/mysite/file.jsp
I whole project is used:
src="<%=request.getContextPath()%>/file.jsp"
In this article there is an examle how to map local folder to tomcat.
This
6. Now inside the above xml file put the following line:
<context docbase="d:/images"></context>
doesnt work for me. I changed it to
(1) <Context docBase="E:/internal"></Context>
It works. But I have a problem. For example I have localhost:8080/mysite/about page.
When I use (1) mapping
src="<%=request.getContextPath()%>/file.jsp" doesnt work because it returns mysite/file.jsp
when I try to map mysite by creating mysite.xml the project is not starting because mysite is a site url.
How can I resolve this problem?
Answer:
The best thing is probably to map each item in E:\Internal individually using the aliases attribute of your <Context> (see http://tomcat.apache.org/tomcat-7.0-doc/config/context.html). Note that using / as an "alias path" is not allowed, which is why you'd have to map each item in E:\Internalindividually.
It would be better if you could use a particular URL space for E:\Internal like /internal/[something] and map the whole directory as an alias, but that might not be feasible for your project.
If you really want to "merge" the two directories (that is, resources from both E:\Internal and CATALINA_BASE/webapps/mysite are available via URLs like /mysite/foo, then you will have to use the VirtualDirContext like this:
<Context>
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=E:\Internal" />
</Context>
(See http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Virtual_webapp andhttp://tomcat.apache.org/tomcat-7.0-doc/config/resources.html#VirtualDirContext_implementation).
原文地址:http://stackoverflow.com/questions/20400465/migrate-from-weblogic-to-tomcat-directory-mapping
migrate from weblogic to tomcat: directory mapping--reference的更多相关文章
- 浅谈WebLogic和Tomcat
J2ee开发主要是浏览器和服务器进行交互的一种结构.逻辑都是在后台进行处理,然后再把结果传输回给浏览器.可以看出服务器在这种架构是非常重要的. 这几天接触到两种Java的web服务器,做项目用的Tom ...
- WebLogic和Tomcat的区别
J2ee开发主要是浏览器和服务器进行交互的一种结构.逻辑都是在后台进行处理,然后再把结果传输回给浏览器.可以看出服务器在这种架构是非常重要的. 这几天接触到两种Java的web服务器,做项目用的Tom ...
- WebLogic和Tomcat
J2ee开发主要是浏览器和服务器进行交互的一种结构.逻辑都是在后台进行处理,然后再把结果传输回给浏览器.可以看出服务器在这种架构是非常重要的. 这几天接触到两种Java的web服务器,做项目用的Tom ...
- 浅谈weblogic与tomcat的区别
weblogic是用于开发.集成.部署和管理大型分布式web应用.网络应用和数据库应用的java应用服务器,将java的动态功能和java enterprise标准的安全性引入大型网络应用的开发集成部 ...
- Three Steps to Migrate Group Policy Between Active Directory Domains or Forests Using PowerShell
Three Steps Ahead Have you ever wished that you had three legs? Imagine how much faster you could ru ...
- file-leak-detector(文件句柄泄漏)在JDK1.6环境下 weblogic 和 tomcat安装方式以及使用方式
file-leak-detector作者博客详见: http://file-leak-detector.kohsuke.org/ file-leak-detector学习贴: https://blog ...
- 【转】Tomcat和Weblogic的区别
J2ee开发主要是浏览器和服务器进行交互的一种结构.逻辑都是在后台进行处理,然后再把结果传输回给浏览器.可以看出服务器在这种架构是非常重要的. 这几天接触到两种Java的web服务器,做项目用的Tom ...
- web容器(weblogic、resin、tomcat、jboss对比)
WebLogic 12c Linux静默安装 weblogic11g 密码忘记解决方案 glassfish和tomcat各自的优势和劣势 Linux Resin4.0 安装配置(优质) 对比 . we ...
- tomcat迁移到weblogic的几个问题
第1个问题: 异常描述:VALIDATION PROBLEMS WERE FOUND problem: cvc-enumeration-valid: string value '3.0' is not ...
随机推荐
- 如何学习YII
我是在Yii的官方wiki上看到这篇文章的.读的第一遍觉得很不错,还有一种想翻译出来的冲动.虽然,本人英文很烂,但是毕竟写了这样多年的代码,估计大概的意思是能有的吧.英文原文:http://www.y ...
- 定制linux中的Gtk theme<一>如何设置窗口按钮的多态效果
GTK主题之个人理解: GTK 主题引擎(包含代码所需的图形元素) + 主题配置文件(gtkrc文件)+ 数据资源文件(如图片等) 三者所呈现给用户的视觉风格效果 GTK拥有一套大量的widg ...
- 阿里云的esc
云服务器ecs作用如下:1.完全管理权限:对云服务器的操作系统有完全控制权,用户可以通过连接管理终端自助解决系统问题,进行各项操作:2.快照备份与恢复:对云服务器的磁盘数据生成快照,用户可使用快照回滚 ...
- Java中权限修饰符public、private、protected和default的区别
1.public 可以修饰类.成员变量和成员函数,没有任何限制,同一个包中,或者不同包中的类都可以自由访问 2.private 可以修饰成员变量和成员函数,只能在本类中使用 3.default (不写 ...
- 《30天自制操作系统》读书笔记(5) GDT&IDT
梳理项目结构 项目做到现在, 前头的好多东西都忘了, 还是通过Makefile重新理解一下整个项目是如何编译的: 现在我们拥有这么9个文件: ipl10.nas InitialProgramLo ...
- 应用mysql(Linux中安装)
当前 mysql 官网的安装教程,指明可以使用 yum 方式. 若在Ubuntu中安装,参考“Linux(Ubuntu)下MySQL的安装与配置”. MySQL YUM Repository MySQ ...
- BZOJ 1185 最小矩形覆盖
Description Input Output Sample Input Sample Output HINT 其实这题就是一道旋转卡壳的裸题,但是我的精度萎了.直接上hzwer的代码吧... #i ...
- win7计划任务执行BAT文件问题
今天下午做了一个调用java 可执行jar的程序,想通过win7的计划任务来调用 批处理命令: java -jar BIDropSyc.jar 或者 javaw -jar BIDropSyc.j ...
- 一句话改变TWinControl控件的left坐标的前世今生(入口函数是SetBounds,然后调用SetWindowPos起作用,并发消息更新Delphi的left属性值)
Delphi的重要属性,主要是Enable, Visible, Color, left等等.这里分析left,因为TWinControl里有些覆盖函数的原因,虽然起点都是TControl.SetLe ...
- 服务器端打开office然后采用虚拟打印 转换成pdf
服务器端打开office然后采用虚拟打印 转换成pdf [WebMethod] public bool ConvertWordTOPDF(string WordPath) { bool ret=fal ...