(LETTERHEAD OF DOHERTY, WALLACE, PILLSBURY AND MURPHY, P.C.) EXHIBIT 5 July 22, 2002 Westbank Corporation 225 Park Avenue West Springfield, MA 01089 RE: Registration Statement on Form S-8 Ladies and Gentlemen: In connection with the registration on Form S-8 under the Securities Act of 1993, as amended (the "Securities Act"), of 54,885 shares (the "Shares') of common stock, par value $2.00 per share, of Westbank Corporation (the "Company") reserved for issuance pursuant to the Cargill Bank of Connecticut Stock Option Plan, as amended and adopted by the Company (the "Plan"), we have examined such corporate documents and records of the Company, such other instruments and certificates of public officials, officers and representatives of the Company and other persons and such questions of law as we have deemed necessary or appropriate in order to render the opinion set forth herein. In such examination, we have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, the conformity to original documents of all documents submitted to us as copies and the authenticity of the originals of such copies. Based upon and subject to the foregoing, we are of the opinion that when the registration statement on Form S-8 relating to the Shares (the "Registration Statement") shall have become effective under the Securities Act and any Shares shall have been duly issued and paid for in accordance with the terms of the Plan, such Shares will be legally issued, fully paid and nonassessable. The foregoing opinion is limited to the Federal Laws of the United States and the General Laws of the Commonwealth of Massachusetts. We are expressing no opinion as to the effect of the laws of any other jurisdiction. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and any amendments thereto. In giving such consent, we do not hereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act. Very truly yours, /s/Doherty, Wallace, Pillsbury and Murphy, P.C. 9