Liferay 6.0.6的Ext插件未在RHEL 5.2 x86_64上执行

时间:2012-06-18 08:25:47

标签: java jboss centos liferay-6

这是一个奇怪的问题。 Liferay 6.0.6的Ext插件可以在任何操作系统平台上执行,但可以在centos或RHEL上执行。

现在我会尽力解释我的实验。

首先,我创建了一个login-hook,其中$LIFERAY_SDK_DIR/hooks/login-hook/docroot/custom-jsps/html/portlet/login/login.jsp上添加了验证码图片:

<portlet:actionURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>" var="captchaURL">
                <portlet:param name="struts_action" value="/login/captcha" />
</portlet:actionURL>

<liferay-ui:captcha url="<%= captchaURL %>" />

并对/html/taglib/ui/captcha/simplecaptcha.jsp进行修改:

<div class="taglib-captcha">
    <table border=0>
        <tr>
            <td>
                <aui:input label="text-verification" name="captchaText" size="10" type="text" value="" />
            </td>
            <td style="padding-left:10px;">
                <img id="captcha_image" alt="captcha" class="captcha" src="<%= url %>"  />
            </td>
            <td>
                <a href="#" id="captcha_change_btn" class="captcha"
                   onclick="return false;"><liferay-ui:message key="change_captcha" />
                </a>
            </td>
        </tr>
    </table>
    <aui:script>
        jQuery.noConflict();
        jQuery(function ($) {
              $('#captcha_change_btn').click(function () {
                 var url = "<%= url %>";
                 $('#captcha_image').attr('src', url + '&random=' + Math.random());
              });
        });
    </aui:script>
</div>

login-hook部署到liferay后,登录窗口将如下所示: enter image description here

其次,我创建了一个login-ext,它将在登录时检查用户提供的验证码文本。所以我添加了代码

    _log.warn("check the captcha ... ");
    CaptchaUtil.check(actionRequest);
    System.out.println("success check captcha");
<{1}} protected void login( ThemeDisplay themeDisplay, ActionRequest actionRequest, ActionResponse actionResponse, PortletPreferences preferences) throws Exception

中的

部署$LIFERAY_EXT_DIR/ext/login-ext/docroot/WEB-INF/ext-impl/src/com/liferay/portlet/login/action/LoginAction.java,然后尝试登录而不提供验证码文本将导致错误,这是正确的。但是当我将整个liferay系统移动到centos 5.8时,将会传递没有验证码文本的登录。

有人能给我一个建议吗? THX

0 个答案:

没有答案