Add MediaType into java template