留言板

Stuck in hook

shubhranshu swain,修改在12 年前。

Stuck in hook

New Member 帖子: 18 加入日期: 11-1-19 最近的帖子
Hi All,

I am currently working in liferay hook. I am able to invoke the liferay provided jsps in my code. But there are some things still missing. The jsp is not able to identify the implicit objects like user, themeDisplay, company, authType etc.

Dont know how to deal with the issue. Any help would be much appreciated.

Regards
thumbnail
Ravi Kumar Gupta,修改在12 年前。

RE: Stuck in hook

Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Generally that error wont come, make sure that you are not removing any include statement in the JSP you are using. Try comparing your modified JSP with the one in deployment for the original content.

Thanks and Regards
Ravi
shubhranshu swain,修改在12 年前。

RE: Stuck in hook

New Member 帖子: 18 加入日期: 11-1-19 最近的帖子
Thanks Ravi and Nisarg
thumbnail
Pranay R Patadiya,修改在12 年前。

RE: Stuck in hook

Regular Member 帖子: 177 加入日期: 10-2-23 最近的帖子
Hi,
Is your problem resolved?

Thanks,
Pranay Patadiya
shubhranshu swain,修改在12 年前。

RE: Stuck in hook

New Member 帖子: 18 加入日期: 11-1-19 最近的帖子
Hi,

Yes. The issue has been resolved now. But the jsp is not able to identify the "authType" object. Dont know how to deal with this. Please help.

Regards
thumbnail
Ravi Kumar Gupta,修改在12 年前。

RE: Stuck in hook

Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
shubhranshu swain:

Yes. The issue has been resolved now. But the jsp is not able to identify the "authType" object. Dont know how to deal with this. Please help.


Can u please paste some code where u r using this..
shubhranshu swain,修改在12 年前。

RE: Stuck in hook

New Member 帖子: 18 加入日期: 11-1-19 最近的帖子
I have imported login.jsp

the code is as below

<%@ include file="/custom_jsps/html/common/init.jsp" %>
<%
String redirect = ParamUtil.getString(request, "redirect");

String login = LoginUtil.getLogin(request, "login", company);
String password = StringPool.BLANK;
boolean rememberMe = ParamUtil.getBoolean(request, "rememberMe");

if (Validator.isNull(authType)) {
authType = company.getAuthType();
}
%>

<%
String loginLabel = null;

if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) {
loginLabel = "email-address";
}
else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) {
loginLabel = "screen-name";
}
else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) {
loginLabel = "id";
}
%>


in the above code the jsp is not able to identify the "authType" object.

Regards
Shubhranshu
thumbnail
Lalit Jugran,修改在12 年前。

RE: Stuck in hook

Junior Member 帖子: 33 加入日期: 10-7-25 最近的帖子
Hi shubhranshu swain,

I don't think any such object(authType) available on jsp page in liferay. You have to create it explicitly. For objects available in jsp page kindly check the link. http://www.mpowerglobal.com/web/ravi/home/-/blogs/default-objects-in-jsp-page-of-liferay
shubhranshu swain,修改在12 年前。

RE: Stuck in hook

New Member 帖子: 18 加入日期: 11-1-19 最近的帖子
Thanks for the response,

I am facing a new problem now i.e.,

<%@ include file="/custom_jsps/html/common/init.jsp" %>

in this include statement the error is

Multiple annotations found at this line:
- UserLockoutException cannot be resolved to a type
- PasswordExpiredException cannot be resolved to a
type
- CookieNotSupportedException cannot be resolved to
a type
- AuthException cannot be resolved to a type
- windowState cannot be resolved
- UserPasswordException cannot be resolved to a type
- UserScreenNameException cannot be resolved to a
type
- UserEmailAddressException cannot be resolved to a
type

The jar files which contain these classes is portal-service.jar. I have also tried adding this jar file in lib folder but all in vain.

Please help me get out of this.

Regards
Shubhranshu
Nisarg Parikh,修改在12 年前。

RE: Stuck in hook

Expert 帖子: 262 加入日期: 09-12-31 最近的帖子
Hey,

Just write <liferay-theme:defineObjects /> in your init.jsp or at the top of your current jsp. Make sure you have added tag library for liferay-theme.
This will automatically add the implicit objects in your page.

Hope this will help you.

-Nisarg