0

I have this: I try to redirect from portlet Historial to portlet Reclamos i'm doing this:

String pageUnique= "prueba.page.SRSC.Reclamos" ;

String portletUnique= "prueba.portlet.SRSC.IngresoSolicitudReclamos" ;

@SuppressWarnings("rawtypes")
String targetURLStra = ServletURLHelper.generateUrl(pageUnique,portletUnique, (HashMap) customerContext, app.getHttpServletRequest(), app.getHttpServletResponse());

I put this in one method and call into the button; that suppose redirect to the Portlet Reclamos...

But i get this error:

[5/15/13 11:20:39:322 PET] 00000068 servlet      [PA_SRSCPORTAL_1] [/wps/PA_SRSCPORTAL_1] [/genjsp/prueba/portlets/portletHistorial_pgError.jsp]: Initialization successful

I have each portlet in different war and the portlet Historial is in IBM Portlet Factory and the portlet Reclamos is in JSR 168

Please any help

Mark Chorley
  • 2,087
  • 2
  • 22
  • 29
EddyR
  • 159
  • 1
  • 1
  • 7

1 Answers1

0

You cannot redirect from "a portlet" to "another portlet". If they are in different WARs, you cannot even use the same JSPs to implement the UI (at runtime). If you literally want to use "the same" jsp, I suppose that you can add this to your deployment environment and copy them in your buildscripts, but it feels clunky and not optimal.

Keep in mind that each WAR file is located in a different classloader and well isolated from each other. One JSP file could not access the variables (attributes, classes, it's hard to even use proper terminology here) injected by another webapplication/WAR.

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
  • Thanks for answer but what about GlobalSession to pass parameters from one portlet to another portlet in different war – EddyR May 21 '13 at 15:28
  • @EddyR I don't see where this is related to your original question - am I missing something? There's the standardized InterPortletCommunication (e.g. public render parameter or events). Without more justification I certainly wouldn't recommend introducing global-variable-like constructs to pollute any software if you need to communicate between portlets. But your question didn't seem like a communication question, rather like a display problem. – Olaf Kock May 23 '13 at 07:12