留言板
Stuck in hook
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
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
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
Thanks and Regards
Ravi
Thanks Ravi and Nisarg
Hi,
Is your problem resolved?
Thanks,
Pranay Patadiya
Is your problem resolved?
Thanks,
Pranay Patadiya
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
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
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..
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
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
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
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
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
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