Liferay request current page name
What is the smartest way to get current page name where re开发者_如何转开发quest came from? By page I mean the real page name that contains current portlet.
By using something like that you should be ok
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
String title = themeDisplay.getLayout().getName(themeDisplay.getLocale());
just be aware,themeDisplay.getLocale() could result different char encoding format, use with caution, may cause certain string functions to fail
精彩评论