• Post Reply Bookmark Topic Watch Topic
  • New Topic

calling Servlet

 
kan nat
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you call a servlet inside another servlet, not sure if its a dump question to ask
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"kan nat " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.


And I am not getting what you mean by "call", you always use a RequestDispatcher for further processing.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can include any resource inside another. Whether it's a good approach to solving a particular issue is another matter entirely. Usually, there's a much more straight-forward means to accomplish code sharing.
 
kan nat
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

thanks, what i meant is can servlet A invoke servlet B and again invoke servlet C, recursive calls.
 
Ryan Beckett
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't use action tags in Servlets, but you can use the RequestDispatcher object to send a request to any resource on the server.

 
kan nat
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

thanks, so its only servlet A invoking another servlet B through RequestDispatcher
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!