Liferay7开发文档_3.4.1组织文件夹

本文介绍如何在guestbook-web项目中对视图层文件进行重新组织,包括创建新的文件夹来存放不同的portlet视图文件,并更新文件内的路径引用。

目前,所有JSP都位于src/main/resources/META-INF/resources文件夹,该文件夹充当上下文根文件夹。要明确区分Guestbook portlet 和 the Guestbook Admin portlet,必须将视图层的文件放在不同文件夹:

  1. In the guestbook-web project, right click the src/main/resources/META-INF/resources folder and select New → Folder. Name the new folder guestbookwebportlet and click Finish.
  2. Copy view.jsp and edit_entry.jsp into the new folder by dragging and dropping them there.
  3. Open both files and change the init.jsp location at the top of the file:
    <%@include file="../init.jsp"%>        
    
  4. Check the other references to JSPs within the files to make sure that they point to the new locations.

当修改视图层以使用新的后端时,必须更新对旧路径的引用。另外,必须在 component properties中更新资源位置。下一步,将修改所有这些属性。

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值