import jakarta.servlet.annotation.WebServlet import jakarta.servlet.http.HttpServlet import jakarta.servlet.http.HttpServletRequest import jakarta.servlet.http.HttpServletResponse @WebServlet("/HelloKotlin") class HelloKotlin: HttpServlet() { protected override fun doGet( request: HttpServletRequest?, response: HttpServletResponse?) { response?.setContentType( "text/html; charset=UTF-8"); response?.getWriter().use { out -> out?.println("""
Hello Kotlin!
""") } } }