Take a look at http://www.doc.ic.ac.uk/~mo197/portlets/portlet_messaging/

Just used this myself to set the source of an iFrame in one portlet from the struts action within another ortlet.

Hope that helps

Jon


Jacek Wiślicki wrote:

Wiadomosc od Archana Turaga z 2005-10-21 23:55 brzmiala:

Thanks for the response. Well the difference here is that I have the same portlet showing up for create/update/delete. So the distinction is done in the portlet.xml (Snippet is as below). So a menu link is associated with that page with specific parameters. The menu is rendered within the Jetspeed scope but the link is to a JSR168 portlet which is an external webapp. Unless I do something like when the link is clicked I somehow pass the attribute along as to what was clicked...then based on that the jsp can show up in the relevant mode. WELL THE BIG QUESTION IS WHERE CAN I SET THIS ATTRIBUTE? What you said is more in the JSR168 session context Right? Do let me know if there is any additional information that is needed? And thanks once again for the response.

As far as I understand, the only problem is passing some attribute between different web aplications (within the same container), right? I don't know much about other servlet containers, but with Tomcat you could set the "crossContext" attribute for either application context to "true" and then setup the parameter (identified e.g. by the HTTP session id) in the other servlet context (another webapp), like this:
//your application context:
<HTTPServlet>.getServletContext().getContext(<String:other app context name>).setAttribute(<String>, <Object>);
//other application context
<HTTPServlet>.getServletContext().getAttribute(<String>);

The above code can be applied from within a servlet, you should modify it to execute from a portlet, i.e. get a servlet context from a portlet context. I am not sure if a PortletContext object could by fully functional as a ServletContext object, however if such a solution fails, use an intermediate redirection servlet for setting the other context attributes.

I do hope that it's what you meant.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to