LiferayPortal以某用户身份登录

Liferay5.2.2中,带了一个 Current Users的Portlet,其可以用某个用户的身份登录Portal。这个功能,可以用于从其他系统登录到Portal的需求。

 

<form action="http://localhost:8080/web/guest/home" method="post" name="loginmichelle">	  <input type="hidden" name="p_p_id" value="58">	   <input type="hidden" name="p_p_lifecycle" value="1">	   <input type="hidden" name="p_p_mode" value="view">	   <input type="hidden" name="p_p_state" value="maximized">	   <input type="hidden" name="_58_struts_action" value="/login/login">	   <input type="hidden" name="_58_login" value="michelle@7cogs.com">	   <input type="hidden" name="_58_password" value="michelle">	   <div class="loginuser" title="Login: michelle@7cogs.com, Password: michelle">	   <div class="user-profile-image" style="float: left; padding-right: 4px;">	   <img width="80" alt="" class="avatar" src="/image/user_portrait?screenName=michelle&amp;companyId=1&amp;t=1228845375823"></div><h2>Michelle Editor</h2>	   <div>Michelle has control over the staging and layout of all articles as well as publishing rights for workflow and the content management system.	    <a class="public_pages" href="/web/michelle">View michelle's public page</a>	    <a class="express_login" href="#" οnclick="document.loginmichelle.submit();return false;">Login as michelle</a></div></div></form>

 

 

http://localhost:8080/web/guest/home为登录Portlet所在的页面地址

 

还需要将在portal-ext.properties文件中加入,否则若浏览器从未访问过Portal的情况下,会提示Cookie错误

session.test.cookie.support=false
 

 

 

 

绝对定位。

    <div stypel="position:absolute; right:5%; top:5px">
        hello!
    </div>

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值