Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling a portlet from servlet

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic