Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Subhasis Roy
How to get the current page name in the JSP
September 27, 2012 11:01 PM
Answer

Subhasis Roy

Rank: Expert

Posts: 284

Join Date: January 19, 2012

Recent Posts

Hi, can any one please tell me that how can i get the page name inside the JSP.
Harish Kumar
RE: How to get the current page name in the JSP
September 27, 2012 11:08 PM
Answer

Harish Kumar

Rank: Expert

Posts: 474

Join Date: July 31, 2010

Recent Posts

1themeDisplay.getLayout().getName()
Subhasis Roy
RE: How to get the current page name in the JSP
September 27, 2012 11:11 PM
Answer

Subhasis Roy

Rank: Expert

Posts: 284

Join Date: January 19, 2012

Recent Posts

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());
%>