Here to introduce me an inspiration: Servlet Var mode (in the end, "mode", these two words are still assessed by everyone). Servlet doesn't have to say, VAR is simpler: it is a variable definition in JavaScript. It can achieve the separation of layers and logic layers, and the specific content is very simple. I believe that everyone will understand the following example.html and servletvar.java files will understand.
1.example.html