Q:

Is JSP superseeded and if so, how?

It was a while since I worked with JSP and servlet. Now I find some material that JSP is obsolete and should not be used. Is that so? Why? What should we use instead for templates if we start a new project with Spring Framework and wish to render web pages or similar output?

A:

Spring (as well as Struts, Apache Wicket and other frameworks) is based on servlet. When you're using Spring for web, you're using servlet as underlying technology.
JSP really little bit outdated. And there are some inconveniences in it. For example, JSP is real headache for web designers. Designer can not just open JSP file, make some changes and check result in browser, because JSP file contains tags, that invalid for HTML. The only way to see how page will be looked in browser is deploy application and let server render it.
Another one inconvenience in JSP that you can't externalize common layout into dedicated file. All you can do is import of one page into another with <jsp:include>. And if you have hundreds of files, you have to repeat same <jsp:include> in all of them for copy common parts.

There are template engines that more suitable for big projects, when you have hundreds of complex dynamical pages. One of popular is Thymeleaf.
Thymeleaf's templates contain just valid HTML. That means designers and programmers can work parallel. Also it has good layout system. Moreover Thymeleaf has much more readable and elegant syntax in contrast to the JSP. As example the code for generate simple table in Thymeleaf:
<html>
....
<table>
  <tr>
    <th>Name</th>
    <th>Price</th>
    <th>In stock</th>
  </tr>
  <tr th:each="prod : ${prods}">
    <td th:text="${prod.name}">Onions</td>
    <td th:text="${prod.price}">2.41</td>
    <td th:text="${prod.inStock}? #{true} : #{false}">yes</td>
  </tr>
</table>
....
</html>

There are many other additional features like build-in support of internationalization, passing parameters to fragments and so on.
More details about comparison of Themeleaf and JSP you can find here and here.

