Foren
How to get the current page name in the JSP
Subhasis Roy, geändert vor 11 Jahren.
How to get the current page name in the JSP
Expert Beiträge: 275 Beitrittsdatum: 20.01.12 Neueste Beiträge
Hi, can any one please tell me that how can i get the page name inside the JSP.
Harish Kumar, geändert vor 11 Jahren.
RE: How to get the current page name in the JSP
Expert Beiträge: 483 Beitrittsdatum: 31.07.10 Neueste BeiträgethemeDisplay.getLayout().getName()
Subhasis Roy, geändert vor 11 Jahren.
RE: How to get the current page name in the JSP
Expert Beiträge: 275 Beitrittsdatum: 20.01.12 Neueste Beiträge
Thanks I got that using
<%@ page import = "com.liferay.portal.kernel.util.WebKeys" %>
<%@ page import = "com.liferay.portal.theme.ThemeDisplay" %>
<%
ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY);
String pageName = themeDisplay.getLayout().getName(themeDisplay.getLocale());
%>
<%@ page import = "com.liferay.portal.kernel.util.WebKeys" %>
<%@ page import = "com.liferay.portal.theme.ThemeDisplay" %>
<%
ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY);
String pageName = themeDisplay.getLayout().getName(themeDisplay.getLocale());
%>