我已经用tomcat包下载了liferay 6并安装了它。当我点击默认的liferay url时,我被重定向到Liferay登录页面。但我的要求是什么是在liferay中创建自定义登录页面的最佳方式
1)I should redirect to the login page of my own when clicks on the sigin button.
2)After clicking on submit button of login page , the user will get authenicated against "Login" table created by me.
3)After authentication the user will redirect to Liferay landing page.
请分享一些示例代码,如果适用于这种requirement.It是非常迫切的me.If这不是把Liferay的相关问题,请给我链接到正确的位置发布我的问题,谢谢。
嗨Vikas在这里我正在编辑问题根据您的answaer。
我用下面的步骤创建了一个钩子。
1)在Eclipse IDE文件 - 新建 - 项目 - LiferayProject - 点击下一步按钮,然后给定项目名称,然后选中复选框钩子和点击完成按钮。
2)的liferay-hook.xml我已经添加/ WEB-INF/JSP的
3)I已经创建了如下的目录结构。 login-hook/docroot/WEB-INF/jsps/html/portlet/login/login.jsp
4)在login.jsp中,我放置了liferay-portal6.1/tomcat-7.0.27/webapps/ROOT/html/portlet/login/login.jsp文件。
当我这样做的时候,它显示出像HtmlUtil这样的jsp文件中的很多红色标记不能被分解。像这样它显示了很多错误。我在这里做了任何错误。请让我知道这个问题。我对liferay很陌生,谢谢。
嗨Vikas.This是我在我的login.jsp中使用的代码。
<HTML>
<HEAD>
<TITLE>Login using jsp</TITLE>
</HEAD>
<BODY>
<H1>LOGIN FORM</H1>
<form>
<table>
<tr>
<td> Username : </td><td> <input name="username" size=15 type="text" /> </td>
</tr>
<tr>
<td> Password : </td><td> <input name="password" size=15 type="text" /> </td>
</tr>
</table>
<input type="submit" value="login" />
</form>
</BODY>
</HTML>
嗨维卡斯非常感谢给了reply.I已经编辑根据您的answer.I我原来的问题我strucked起来的第一步你回答自己。请你告诉我我做错了什么。 – aaaa
'HtmlUtil.escape'用于转义字符。它们可以在类“HtmlUtil”中找到。在您的自定义JSP中,检查是否已导入Liferay的init.jsp。 '<%@ include file =“/ html/portlet/login/init.jsp”%>'。你不必为此导入任何罐子。 init.jsp加载许多实用类 –
是的。在我自定义的jsp中,我已经导入了liferay.jsp的init.jsp。我需要复制此init.jsp并将其放置在钩子中。 – aaaa