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:\Internal
individually.
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 ...
随机推荐
- 菜鸟必备教程,ajax与xml交互传输数据。
今天,公司让学习ajax,然而我并不会,着急到爆炸,boom~~啥卡拉咔.看着教程一步一步摸索,写出来交互页面,写代码真的好惆怅啊. 额,不说废话,下面是源代码. 首先是ajax的代码,注释真的很重要 ...
- Atom package安装失败的解决方案
cd ~/.atom/package git clone [package url] cd [package name] apm install [package name] if lack some ...
- JS判断是否为一个数组
function isArray(object){ return object && typeof object==='object' && Array == obje ...
- xamp配置多域名站点
xampp配置多站点出现,htdocs目录和虚拟目录二者只能选其一的情况,我的xampp安装在D:\xampp\,默认web根目录在D:\xampp\htdocs,然后我在D:\magento安装了m ...
- yii框架基本操作
<?php namespace app\controllers; use yii\web\Controller; use app\models\DemoForm; use app\models\ ...
- TatukGIS - GisDefs - CheckFileWriteAccess 函数
函数名称 CheckFileWriteAccess 所在单元 GisDefs 函数原型 1 function CheckFileWriteAccess(const _file ...
- Swift-MJ
1.声明变量 常量 声明变量:var age = 10 声明常量:let age = 10 (不加分号,除非多条语句写在同一行) 二进制前缀:0b(必须小写) 八进制前缀:0o 十六进制前缀:0x 2 ...
- Gridview BottomPagerRow添加自定义控件
pager.ascx public partial class pager : System.Web.UI.UserControl{ } .aspx protected pager ctl; prot ...
- VmWare问题解决(网络变更后虚拟主机无法上网)
安装 Vmware,并新建一个虚拟机后,当时做好配置(NAT模式)后,虚拟机能够正常上网. 然后将电脑带到另一个地理位置办公时,却无法上网. 本篇探讨问题的缘由和几种解决方式. 一.缘由解析 仅探讨上 ...
- java打jar包 命令行cmd在当前路径打jar包
不尝试就永远不会知道真相. 今天搞webservice,需要将服务单独拉出来发布.打jar包的时候要打成aar包,所以用到cmd下的打jar包的命令. 当前路径打jar包,一定要先进到这个文件夹,然后 ...