title: How to use Thymeleaf to make only a simple Java app (without Spring)
body: <p>I'm following the official Thymeleaf tutorial on <a href="https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html" rel="nofollow noreferrer">its website</a> and I'm currently on the section <a href="https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#executing-the-template-engine" rel="nofollow noreferrer"><em>Executing the template engine</em></a>.</p>
  <p>From what I understood, I should already be able to run the app coded so far, but I absolutely don't see how to run it. There is no <code>main(String[] args)</code> method to run at all.</p>
  <p>I tried searching for other tutorials but they all use Spring which is not what I'm looking for right now.</p>
  <p>Anyone knows where I should insert a <code>main(String[] args)</code> method to run this Thymeleaf app and view my HTML template? I don't understand where the entry point is or should be.</p>
  <p>I apologize in advance if this question sounds dumb and thanks for your future replies.</p>
  <hr />
  <p>Edit:</p>
  <p>Until now, when following the tutorial I wrote 3 Java files:</p>
  <ul>
  <li><a href="https://i.stack.imgur.com/GHkbF.png" rel="nofollow noreferrer">GTVGApplication</a> class</li>
  <li><a href="https://i.stack.imgur.com/6fGoQ.png" rel="nofollow noreferrer">IGTVGController</a> interface</li>
  <li><a href="https://i.stack.imgur.com/HDjej.png" rel="nofollow noreferrer">HomeController</a> class</li>
  <li><a href="https://i.stack.imgur.com/zxQdk.png" rel="nofollow noreferrer">home.html</a> template to be displayed</li>
  </ul>
  <p>So I thought of writing a main method like so:
  <a href="https://i.stack.imgur.com/rgt9Y.png" rel="nofollow noreferrer">Main class containing main(String[] args) method</a></p>
  <p>But I don't see how to correctly instantiate the <em>servletContext</em> and I'm not even sure if everything will work out once this is done.</p>