This content has been marked as final. Show 1 reply
Debopam wrote:Seems like you do not want to call Servlet2, what you want to do is be able to invoke the logic that Servlet2 invokes from Servlet1. Putting the logic in a class of its own and calling it from both Servlet1 and Servlet2 is always an option. Otherwise you have to do very icky forwarding logic, setting flags so you prevent the servlets from going in an endless forwarding cycle.
Please let me know how to achieve that.
Alternatively, you could create a common abstract base class for both servlets which has a method with the logic that both servlets need.