Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Portlet-servlet communication with JSR168 ?

 
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 26912
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, this is possible. You can use the portlet request dispatcher to forward to a jsp or a servlet.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic