The preset invention relates to a new method or composition for treating a gastric ulcer, preventing or treating an infection of H. pylori, particularly multidrug resistant H. pylori, using an antimicrobial peptide, a functional derivate, fragment or variant thereof, wherein the antimicrobial peptide is selected from the group consisting of Epi-1, TPs and combination thereof.