Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call servlet from struts application

 
umasankar puranam
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I want to call a HttpServlet from struts application. Please provide me sample code for doing so.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just provide a forward that points to the URL of the servlet. Then return that ActionForward from your Struts Action class. Example:

struts-config.xml

action class
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic