I think you have to compile servlet yourself. I consider JSP is
high level. Tomcat will do all the things in JSP in its way.
For Java servlet, you can tell tomcat what to do exactly. You can even output control character if you want. Therefore, I think servlet do not compile like jsp.
Sorry, I cannot help.