zoukankan      html  css  js  c++  java
  • 如何在Liferay 7中用html显示页面

    liferay portlet默认的显示页面是view.jsp,虽然可以在jsp中用include标签包括html文件,但是如何直接通过修改配置文件让默认的显示页面为view.html呢?

    1.用Liferay IDE建一个mvc-portlet,打开其中的java代码,把@Component内容改成如下所示

    @Component(
         immediate = true,
         property = {
             "com.liferay.portlet.display-category=category.sample",
             "com.liferay.portlet.instanceable=true",
             "javax.portlet.display-name=test Portlet",
             "javax.portlet.init-param.template-path=/",
             "javax.portlet.init-param.view-template=/view.html",
            "javax.portlet.init-param.valid-paths=/view.html",
            "javax.portlet.resource-bundle=content.Language",
           "javax.portlet.security-role-ref=power-user,user"
       },
        service = Portlet.class
    )
    public class TestPortlet extends MVCPortlet {       
    }

    就是这个样纸啦

  • 相关阅读:
    LaTeX 超链接
    剑指offer2 数组
    LaTeX 插入源代码
    RGB
    linux 程序在后台运行
    Linux Vim编辑与退出
    复杂度估计
    剑指offer 2 loading...
    剑指offer2 整数
    剑指offer2 字符串
  • 原文地址:https://www.cnblogs.com/hibou/p/6833520.html
Copyright © 2011-2022 走看看