No tag defined in tag library imported with prefix
<p>I am working with Java EE 7 in Intellij IDEA and trying to create and use a custom .tag file. I have followed <a href="https://stackoverflow.com/a/3257426/4545369">this</a> answer and created a wrapper.tag file in WEB-INF/tags :</p>

<pre><code>&lt;%@tag description="Simple Wrapper Tag" pageEncoding="UTF-8"%&gt;
&lt;html&gt;&lt;body&gt;
  &lt;jsp:doBody/&gt;
&lt;/body&gt;&lt;/html&gt;
</code></pre>

<p>And i have created a .jsp file in my web directory:</p>

<pre><code>&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
&lt;%@taglib prefix="t" tagdir="/WEB-INF/tags" %&gt;

&lt;t:wrapper&gt;
    &lt;h1&gt;Welcome&lt;/h1&gt;
&lt;/t:wrapper&gt;
</code></pre>

<p>But when loading the page I always one of two following errors:</p>

<ul>
<li>No tag "wrapper" defined in tag library imported with prefix "t"</li>
<li>lang.ClassNotFoundException: org.apache.jsp.temptest_jsp</li>
</ul>

<p>Note that my jsp file is called temptest.jsp.
Thanks in advance</p>