Windshield gasket replacment

Hey all
I need to replace the front windshield gasket, I have it already,
what do you guys that have done it recommend?
During rain, I get a constant trickle of water down the rear edge of the kick panel on
both sides of the car. And I can't think of anything else that would allow this to
happen except for the gasket.
Also what is used to attache the gasket to the body?
Best