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. So, lets become a technical James Bond and investigate about it. :D
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.
These are 9 objects.
The following statements will give 14 default objects :
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<liferay-theme:defineObjects />
and the type of each object as follows :
ActionRequest actionRequest = (ActionRequest) pageContext.findAttribute(“actionRequest”);
So, here are the objects that I found. Hope this will help.you can also reffer these links :http://liferay.wikispaces.com/http://liferaylearning.wikispaces.com/
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.
These are 9 objects.
- request (javax.servlet.ServletRequest)
- response (javax.servlet.ServletResponse)
- out (javax.servlet.jsp.JspWriter)
- pageContext (javax.servlet.jsp.PageContext)
- session (javax.servlet.http.HttpS)
- application (javax.servlet.ServletContext)
- config (javax.servlet.ServletConfig)
- page (java.lang.Object)
- exception (java.lang.Throwable)
The following statements will give 14 default objects :
- <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
- <portlet:defineObjects />
- actionRequest (javax.portlet.ActionRequest)
- actionResponse (javax.portlet.ActionResponse)
- eventRequest (javax.portlet.EventRequest)
- eventResponse, (javax.portlet.EventResponse)
- portletConfig, (javax.portlet.PortletConfig)
- portletName, (java.lang.String portletName ;
- portletPreferences, (javax.portlet.PortletPreferences)
- portletPreferencesValues, (java.util.Map)
- portletSession, (javax.portlet.PortletSession)
- portletSessionScope, (java.util.Map)
- renderRequest, (javax.portlet.RenderRequest)
- renderResponse, (javax.portlet.RenderResponse)
- resourceRequest, (javax.portlet.ResourceRequest)
- resourceResponse (javax.portlet.ResourceResponse)
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<liferay-theme:defineObjects />
and the type of each object as follows :
- themeDisplay (com.liferay.portal.theme.ThemeDisplay)
- company (com.liferay.portal.model.Company)
- account (com.liferay.portal.model.Account)
- user (com.liferay.portal.model.User)
- realUser (com.liferay.portal.model.User)
- contact (com.liferay.portal.model.Contact)
- layout (com.liferay.portal.model.Layout)
- layouts (java.util.List)
- plid (java.lang.Long)
- layoutTypePortlet (com.liferay.portal.model.LayoutTypePortlet)
- scopeGroupId (java.lang.Long)
- permissionChecker (com.liferay.portal.security.permission.PermissionChecker)
- locale (java.util.Locale)
- timeZone (java.util.TimeZone)
- theme (com.liferay.portal.model.Theme)
- colorScheme (com.liferay.portal.model.ColorScheme)
- portletDisplay (com.liferay.portal.theme.PortletDisplay)
- portletGroupId (java.lang.Long)
ActionRequest actionRequest = (ActionRequest) pageContext.findAttribute(“actionRequest”);
So, here are the objects that I found. Hope this will help.you can also reffer these links :http://liferay.wikispaces.com/http://liferaylearning.wikispaces.com/
No comments:
Post a Comment