• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Portlet-servlet communication with JSR168 ?

 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is This possible?
If I want a portlet to communicate with a servlet like this..
StringBuffer buf = new StringBuffer(request.getContextPath()+response.encodeURL("/SomeServlet"));
log("BasePortlet jsp file name=" + buf.toString() + "Trying to get to SERVLET PDF/SERVLET"
, METHOD_NAME, CLASS_NAME);
PortletRequestDispatcher rd=getPortletContext().getRequestDispatcher(
buf.toString());
rd.include(request,response);
Is this possible from inside the portlet. ?
Thanks
Dhiren
 
Paul Clapham
Sheriff
Posts: 21002
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anything related to Websphere here. And we do have a forum specifically for JSR-168 things (Portals and Portlets), so I will move the question there.
 
Ali Hassaan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i dont have a clue for proving that whether its possible or not.. but as far as i know... portlet executes in portlet container and servlets in a servlet container.. so calling servlet to a portlet is i think not possible..
 
Chad McGowan
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this is possible. You can use the portlet request dispatcher to forward to a jsp or a servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic