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 ...
随机推荐
- C#中foreach遍历学习笔记
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using S ...
- R语言数据分析
CSDN博客:包括R语言基础.R语言数据挖掘.hadoop大数据及spark等 http://blog.csdn.net/qq_16365849 R语言及数据分析 http://blog.csdn.n ...
- Git error- fatal- Needed a single revision
最近在开发中由于项目结构的重构,有一部分代码被抽出来作为了公共库(git submodule),这样公共库可以独立维护,同时其他库调用它也是非常方便的,避免了到处复制代码的痛苦. 但我在项目重构后第一 ...
- WinPcap编程(一)
0. 按着文档顺序写的. 开发环境:win10+VS2013. 配置WinPcap环境就不多说.直接给网址:http://blog.sina.com.cn/s/blog_57432f380101qh3 ...
- JSP HTML区别
1.最简单的区别就是,HTML能直接打开,jsp只能发布到Tomact等服务器上才能打开2.定义上HTML页面是静态页面可以直接运行,JSP页面是动态页它运行时需要转换成servlet.3.他们的表头 ...
- 最新iOS 6 in Xcode4.5新特性——Storyboard和属性自动绑定
最新iOS 6 in Xcode4.5新特性编程之二(上)——Storyboard和属性自动绑定 从Xcode 4.3开始,Storyboard 就是iOS 5和iOS 6中令人兴奋的一个新特性,他将 ...
- mysql 修改max_allowed_packet
-- 查询max_allowed_packetshow VARIABLES like '%max_allowed_packet%'; 修改 my.ini 或 my.cnf [mysqld] max_a ...
- 隐藏 response headers
1.response headers 为何物 从上图看到..这 透漏出服务器端 1.操作系统版本, IIS版本.开发语言 .以及.net framework 版本 虽然现在IIS 可以挂php .甚至 ...
- HttpClient4.3.6 实现https访问
package httptest; import java.io.IOException; import java.nio.charset.Charset; import java.security. ...
- 如何用正则匹配后缀名不为.jpg, .css, .js, .html, .htm, .png的文件
有网友碰到过这样的问题:如何用正则匹配后缀名不为.jpg, .css, .js, .html, .htm, .png的文件,问题详细内容为: 如何用正则匹配后缀名不为.jpg, .css, .js, ...