• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can portlet internally call servlets using RequestDisptachers ?

 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can portlets internally call portlets (JSR168) .
This is the code I added.
StringBuffer buf = new StringBuffer(request.getContextPath()+response.encodeURL("/PdfServlet"));
log("BasePortlet jsp file name=" + buf.toString() + "Trying to get to SERVLET PDF/SERVLET"
, METHOD_NAME, CLASS_NAME);
PortletRequestDispatcher prd=getPortletContext().getRequestDispatcher(
buf.toString());
prd.include(request,response);
What happens is this gets redirected into the Webcontent area so not sure how I can invoke my servlet from this RequestDispatcher.

Thanks
Dhiren
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic