Foren
How to invoke another application page from processAction
varun kashyap, geändert vor 9 Jahren.
How to invoke another application page from processAction
New Member Beiträge: 2 Beitrittsdatum: 11.02.13 Neueste Beiträge
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.
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.