We have an application deployed at two servers, server1 and server2. While server1 is handling the request it crashes. How the request will be redirected to server1 without loosing any data from the server1.
You want to ensure that the request originally sent to server 1 doesn't fail, and instead gets managed by server 2? Typically you would allow that request to fail and send a response to the client and then manage things so that no more requests get sent to server 1.
Otherwise you can try something like JMS or JINI, or you may be able to find a container that has this built in, or even a hardware load balancer.