File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Portals and Portlets and the fly likes calling a portlet from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "calling a portlet from servlet" Watch "calling a portlet from servlet" New topic
Author

calling a portlet from servlet

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
From this: http://www-128.ibm.com/developerworks/websphere/techjournal/0302_konduru/konduru.html

We can call a servlet from a portlet:

In doView() method:



Can we do reverse? that means, calling a portlet from servlet?

Thanks!
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

The Ajax portlet typically uses a JSP or Servlet as a resource feed.

Problem with the reverse, is I don't know any way to invoke a portlet without going through the portal server, which triggers the entire theme/skin/etc to be generated. Plus, uniquely linking to a portlet might be a problem. Getting a URL to a specific portlet without getting anything but the portlet might be a problem - I'm not sure how you'd do that.

What I would say is that WSRP might solve this problem. It is a way to make a portlet available as though it were a web service. Linking in to the WSRP interface of a portlet (Web Services for Remote Portlets) might be the direction you're fishing in. WSRP is kewl, but seemed to have fallen out of favour for a while. It is a big part of JSR286, but we won't see any JSR-286 commercial portal servers for a while.

-Cameron McKenzie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calling a portlet from servlet