user servlet api

Directly use servlet api to set cookies.