如何从保存在 ROOT\WEB-INF\classes 路径中的自定义 JSP 接收数据
我通过使用内部的portal-ext.properties修改了Liferay页面的静态页面 D:\Liferay\Liferay Tomcat\liferay-portal-6.1.0-ce-b4\tomcat-7.0.22\webapps\ROOT\WEB-INF\classes
**portal-ext.properties
auth.login.community.url= /Test.jsp**
这个特定的 Test.jsp 保存在路径下 D:\Liferay\Liferay Tomcat\liferay-portal-6.1.0-ce-b4\tomcat-7.0.22\webapps\ROOT
这是我的 Test.jsp 页面
<form method="POST" action="/MyActionclass">
Enter your name:</font><input type="text" name="username" size="20"></p>
Enter your password:</font><input type="text" name="password" size="20"></p>
</form>
这工作正常,自定义页面已加载。
请告诉我,在哪里配置这个MyActionclass才能接收JSP提交的数据?
我的要求是,一旦在 MyActionclass 中验证了用户名和密码(现在已硬编码),我将显示我开发的 portlet。
I have modified the static page of the Liferay Page by using portal-ext.properties inside
D:\Liferay\Liferay Tomcat\liferay-portal-6.1.0-ce-b4\tomcat-7.0.22\webapps\ROOT\WEB-INF\classes
**portal-ext.properties
auth.login.community.url=/Test.jsp**
This Particular Test.jsp is kept under path
D:\Liferay\Liferay Tomcat\liferay-portal-6.1.0-ce-b4\tomcat-7.0.22\webapps\ROOT
This is my Test.jsp page
<form method="POST" action="/MyActionclass">
Enter your name:</font><input type="text" name="username" size="20"></p>
Enter your password:</font><input type="text" name="password" size="20"></p>
</form>
This works fine, custom page is loaded.
Please tell me, where to configure this MyActionclass so that it will receive the data submitted from the JSP?
My requirement is that, once the username and password are validated inside the MyActionclass (Hardocded as per now), I will display my portlets developed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您使用 Liferay 6 Plugins-SDK 为您的解决方案创建一个自定义 Portlet。然后您可以使用标准的 Portlet 架构来处理身份验证等。
同样,您可以使用 Liferay 的登录 portlet 来对用户进行身份验证。
无论哪种方式,您都需要将成功登录后要显示的 portlet 的权限设置为不具有来宾“查看”权限,并确保分配给登录用户的角色具有“查看”权限。这将对任何未经 Liferay 身份验证的用户隐藏它们。
如果您查看有关 的 Wiki 帖子Liferay Plugins-SDK 您可以开始创建您自己的 portlet(如果您还没有这样做)。
希望这有帮助!
I would suggest that you create a custom Portlet using the Liferay 6 Plugins-SDK for your solution. Then you can just use the standard Portlet architecture to handle the authentication etc.
Equally you can just use Liferay's login portlet to authenticate users.
Either way you'll need to set permissions on the portlets you want to display after successful login to not have Guest "View" permissions, and make sure that the Role assigned to Logged in users has "View" permissions. This will hide them from any non Liferay authenticated user.
If you look at the Wiki post about Liferay Plugins-SDK you can get started with creating your own portlet (if you haven't done so already).
Hope this helps!