Sorry to say but I got answer My problem was that I could not create user defined methods in
servlet but now I have solution below I put my code i.e solution for methods.
It's all my mistake I could not understand that how to do this now I got solution above are user defined methods which can be accessible in anather servlet class by creating object...
such as
Thank you both to want to help me. In future I will need your help Thank you....!