<pre><code>&lt;servlet&gt;
    &lt;servlet-name&gt;myservlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;workflow.WDispatcher&lt;/servlet-class&gt;
    &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
&lt;/servlet&gt;

&lt;servlet-mapping&gt;
    &lt;servlet-name&gt;myservlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*NEXTEVENT*&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;
</code></pre>

<p>Above is the snippet from Tomcat's <code>web.xml</code>. The URL pattern <code>*NEXTEVENT*</code> on start up throws</p>

<blockquote>
  <p>java.lang.IllegalArgumentException: Invalid &lt;url-pattern> in servlet mapping</p>
</blockquote>

<p>It will be greatly appreciated if someone can hint at the error.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­</p>

```
```
<url-pattern>*NEXTEVENT*</url-pattern>
```
```
The URL pattern is not valid. It can either end in an asterisk or start with one (to denote a file extension mapping).
The url-pattern specification:
A string beginning with a ‘/’ character and ending with a ‘/*’
  suffix is used for path mapping.
A string beginning with a ‘*.’ prefix is used as an extension
  mapping.
A string containing only the ’/’ character indicates the "default"
  servlet of the application. In this
  case the servlet path is the request
  URI minus the context path and the
  path info is null.
All other strings are used for exact matches only.
See section 12.2 of the
Java Servlet Specification
Version 3.1 for more details.