掲示板

How to get the current page name in the JSP

thumbnail
11年前 に Subhasis Roy によって更新されました。

How to get the current page name in the JSP

Expert 投稿: 275 参加年月日: 12/01/20 最新の投稿
Hi, can any one please tell me that how can i get the page name inside the JSP.
thumbnail
11年前 に Harish Kumar によって更新されました。

RE: How to get the current page name in the JSP

Expert 投稿: 483 参加年月日: 10/07/31 最新の投稿
themeDisplay.getLayout().getName()
thumbnail
11年前 に Subhasis Roy によって更新されました。

RE: How to get the current page name in the JSP

Expert 投稿: 275 参加年月日: 12/01/20 最新の投稿
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());
%>