留言板

How to invoke another application page from processAction

varun kashyap,修改在9 年前。

How to invoke another application page from processAction

New Member 帖子: 2 加入日期: 13-2-11 最近的帖子
I have a portlet which is part of a page.
In this portlet which extends GenericPortlet i want to make a check in processAction . Based on user selection, i will construct a URL and invoke the other page.
The other page is also a liferay page but may/may not be from same application.

I have tried different things:
1. response.setRenderParameter("jspPage", myjsp);
2. response.sendRedirect("/web/myapp2/home");
3. String portletName = (String)request.getAttribute(WebKeys.PORTLET_ID);
logger.debug("portlet name is "+portletName);
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
logger.debug("themeDisplay name is "+themeDisplay);
PortletURL redirectURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(request),
portletName,
themeDisplay.getLayout().getPlid(), PortletRequest.RENDER_PHASE);

redirectURL.setParameter("jspPage", "/web/myapp2/home");

try {
response.sendRedirect(redirectURL.toString());

but nothing is working.
Please guide.