Skip to content

Instantly share code, notes, and snippets.

@ranraj
Created October 15, 2014 05:47
Show Gist options
  • Save ranraj/741bcc2f22ec57ac9e58 to your computer and use it in GitHub Desktop.
Save ranraj/741bcc2f22ec57ac9e58 to your computer and use it in GitHub Desktop.
Liferay portlet session error iterator
<%@page import="java.util.Iterator"%>
<%@page import="com.liferay.portal.kernel.servlet.SessionErrors"%>
<%
Iterator<String> itErrors = SessionErrors.iterator(renderRequest);
while (itErrors.hasNext()){
String errorKey = itErrors.next();
%>
<%=errorKey%>
<%
}
%>
@ranraj
Copy link
Author

ranraj commented Oct 15, 2014

When your Liferay-ui:error giving trouble to complete your task. Just use the above snippet to itereate and check whether the session error key present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment