English 中文(简体)
生命线管理
原标题:Session Management in Liferay

How come I customize the session in Liferay?Sample codes are welcome as it will help more,I am pretty new to Liferay? To be more specific, i ll explain what i ve done. Using Custom JSPs Hooks , i have overridden the $PORTAL_ROOT_HOME/html/portlet/login login.jsp and created my own jsp page and also overridden the LoginAction class.My login.jsp page looks like:

<aui:form action="" method="post">
        <table>
            <tr>
                <td>Username :</td>
                <td><input name="login" size=15 type="text" /></td>
            </tr>
            <tr>
                <td>Password :</td>
                <td><input name="password" size=15 type="password" /></td>
            </tr>
        </table>
        <aui:button type="submit" value="sign-in"/>
</aui:form>

现在请在点击提交纽州时说明如何在LoginAction中实现 log的数值。 java,从而将价值观设定为会议。 这是通过定制的含义。

最佳回答

您本应当复制 or。 j 从一开始就存档。 根据您的法典,你想把行动定在你们的行动上。 可采取以下方式:

<portlet:actionURL secure="<%= PropsValues.COMPANY_SECURITY_AUTH_REQUIRES_HTTPS || request.isSecure() %>" var="loginURL">
            <portlet:param name="saveLastPath" value="0" />
            <portlet:param name="struts_action" value="/login/login" />
            <portlet:param name="doActionAfterLogin" value="<%= portletName.equals(PortletKeys.FAST_LOGIN) ? Boolean.TRUE.toString() : Boolean.FALSE.toString() %>" />
        </portlet:actionURL>

<aui:form action="<%= loginURL %>" method="post">
        <table>
            <tr>
                <td>Username :</td>
                <td><aui:input name="login" size=15 type="text" /></td>
            </tr>
            <tr>
                <td>Password :</td>
                <td><aui:input name="password" size=15 type="password" /></td>
            </tr>
        </table>
        <aui:button type="submit" value="sign-in"/>
</aui:form>

www.un.org/spanish/ecosoc 请注意,最好将原封价美元-ROOT_HOME/html/portlet/login/login.jsp复制到你身上。 然后作必要的修改。

如果你的主机是你们所有的,那么你会打破现有的功能。

接受你可使用Pauls答案的行动参数。

问题回答

你们可以按照这一法典取得标志性价值:

    String login = ParamUtil.getString(request, "login");
    String password = ParamUtil.getString(request, "password");

3. 设定一些价值观供会议使用:

    HttpSession session = request.getSession();
    session.setAttribute("parm", "somevalue");

BR, Paul





相关问题
Error getting SVN repo of Liferay in Eclipse

Im using Eclipse Galileo and have installed Subclipse. I looked at the svn repo url at http://www.liferay.com/web/brian.chan/blog/-/blogs/changes-to-anonymous-access-to-liferay-s-svn and then tried to ...

Liferay + google openid HOW?

Is there someone who knows how to use Liferay 5.2.3 the most up2date free version of liferay with google openid ? I ve try to use the http://www.google.com/accounts/o8/id url but it doesnt work. For ...

How can I determine Objects in application context?

I am trying to write a portlet for Liferay (using Tomcat and Spring) and need to use a database via Persistence API/Hibernate. I am using some configuration XMLs (applicationContext.xml, etc.) and ...

how to delete liferay s theme cache files? [closed]

i have developed a theme for liferay and i have deployed it. but when i choose the theme it doesnt recognize it s styles and it is reading styles from previous theme caches. how can i delete ...

热门标签