Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Call a servlet(one that extends HttpServlet) from any of the action classes ?

 
san geetha
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The scenario is, i have a class A that extends Action class.
I want to redirect the control to servlet, where by using ServletOutputStream i wud display some data in Excel format.
Iam aware that in struts, after executing the excute() method in the Action Class..the controller servlet needs to forward the control to anyother jsp or action class.
So how do i go about in my scenario.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also make your Action class' execute() method return a new ActionForward("/servlets/MyExcelGeneratorServlet")
 
san geetha
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, let me try and get back if i face some other issues.
Thanks a lot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic