更改 liferay 工程的 context root

Liferay 缺省发布在服务器的根目录下,我们可以通过修改一些设置来实现修改 context root 的目的。

 

1. 在.../glassfish/domains/domain1/applications/j2ee-modules/liferay-portal-5.2.3/WEB-INF目录下修改 sun-web.xml 文件(由于我发布在glassfish上所以修改这个文件)。

 

原文件内容为:  <context-root>/</context-root>

 

修改为:           <context-root>/liferay/</context-root>

 

2. 在.../glassfish/domains/domain1/applications/j2ee-modules/liferay-portal-5.2.3/WEB-INF/classes目录下建立 portal.ctx 文件。

 

内容为:

     ## Portal Context
##
#
# Set this property if you deploy the portal to another path besides root.
#
portal.ctx=/liferay

 

3. 在 glassfish 的 Web Applications 中将新发布的 liferay-portal-5.2.3 Context Root修改为 /liferay, 保存。

 

4. 重新启动glassfish, 此时context root 已经改变为 http://localhost:8080/liferay/web/guest/home/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值