They are often prepared by reaction of the acid or the ester with halogen:
A related method is the Hell-Volhard-Zelinsky halogenation.
Amino acids are susceptible to diazotization in the presence of chloride, a process that affords chiral 2-chloro carboxylic acids and esters.