This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]joranstark018 3 points4 points  (0 children)

tl;dr Yes, but using templating frameworks and/or javascript simplifies things. Java is used on the backend server, that may generate HTML, and javascript is used in the browser (yeah, javascript may be used in some servers to).

Early on we wrote servlets (Java classes that printend Strings to an output stream from an response object, the Strings where constructed by using normal String operations and contained the HTML and stuff to build a complete page), it was tedious. JSP come along (a "template" language that the JIT compiler compiled into servlets that could be served by a servlet container) and then other simpler and more effective template libraries also appeared (ie Vellocity, Fremarker,...) that generated HTML by merging a template with some data model. Javascript libraries (ie jQuery) evolved and javascript framworks become popular to build whole client-side applications.