• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB communication with servlet  RSS feed

 
saahil sinha
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i make an ejb communicate with a servlet and then send output of servlet to jsp.Any idea.Please send me soem sample code if possible
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really mean the other way ie., how Servlet/JSP communicates with EJB right? :roll:
 
Pearlo Muthukumaran
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If your flow is
JSP <-> EJB <-> Servlet,
Use the URLConnection object within to get the content of the servlet....
A word of Caution always, extract data from servlet and clear the URL Connection to the servlet.....
Recommended to use in Stateless session Bean
A big NO..NO.. in stateful session bean and NEVER in Entity Bean
Hope this helps :-)
Rgds
Muthu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!