On a
normal JSP page, some objects are implicitly available. In addition, we can get
several others in Liferay using the taglibs. But we don't know all.
Lets see about normal JSP first:
These
objects are created by the container automatically and the container makes them
available to us. Since these objects are created automatically by the container
and are accessed using standard variables; and that is why, they are called
implicit objects. They are parsed by the container. They are available only
within the jspService method and not in any declaration.
1. request (javax.servlet.ServletRequest)
2. response (javax.servlet.ServletResponse)
3. out (javax.servlet.jsp.JspWriter)
4. pageContext (javax.servlet.jsp.PageContext)
5. session (javax.servlet.http.HttpS)
6. application (javax.servlet.ServletContext)
7. config (javax.servlet.ServletConfig)
8. page (java.lang.Object)
9. exception (java.lang.Throwable)
Now, lets eleborate the liferay context:
The following statements will give 14 default objects :
1. <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
2. <portlet:defineObjects />
3. actionRequest (javax.portlet.ActionRequest)
4. actionResponse (javax.portlet.ActionResponse)
5. eventRequest (javax.portlet.EventRequest)
6. eventResponse, (javax.portlet.EventResponse)
7. portletConfig, (javax.portlet.PortletConfig)
8. portletName, (java.lang.String portletName ;
9. portletPreferences, (javax.portlet.PortletPreferences)
10. portletPreferencesValues, (java.util.Map)
11. portletSession, (javax.portlet.PortletSession)
12. portletSessionScope, (java.util.Map)
13. renderRequest, (javax.portlet.RenderRequest)
14. renderResponse, (javax.portlet.RenderResponse)
15. resourceRequest, (javax.portlet.ResourceRequest)
16. resourceResponse (javax.portlet.ResourceResponse)
And the following statements will give 18 default
objects :
<%@
taglib uri="http://liferay.com/tld/theme"
prefix="liferay-theme" %>
<liferay-theme:defineObjects />
and the type of each object as follows :
1. themeDisplay (com.liferay.portal.theme.ThemeDisplay)
2. company (com.liferay.portal.model.Company)
3. account (com.liferay.portal.model.Account)
4. user (com.liferay.portal.model.User)
5. realUser (com.liferay.portal.model.User)
6. contact (com.liferay.portal.model.Contact)
7. layout (com.liferay.portal.model.Layout)
8. layouts (java.util.List)
9. plid (java.lang.Long)
10. layoutTypePortlet (com.liferay.portal.model.LayoutTypePortlet)
11. scopeGroupId (java.lang.Long)
12. permissionChecker (com.liferay.portal.security.permission.PermissionChecker)
13. locale (java.util.Locale)
14. timeZone (java.util.TimeZone)
15. theme (com.liferay.portal.model.Theme)
16. colorScheme (com.liferay.portal.model.ColorScheme)
17. portletDisplay (com.liferay.portal.theme.PortletDisplay)
18. portletGroupId (java.lang.Long)
These
default objects can be acquired using pageContext which is an implicit object
of JSP. Use the following code for getting default objects.
ActionRequest
actionRequest = (ActionRequest) pageContext.findAttribute(“actionRequest”);
So, here are the objects that I found. Hope this will help.