Reputation: 389
I'm trying to work with servlets, so I created a Java EE project on a Tomcat server. As you can see below, I have an environment variable JAVA_HOME
, which holds the path to JDK 10. The Java version also defaults to 10, however when I start my Tomcat server, I get the highlighted error.
The problem arose after I created a servlet and tried to map it like in the screenshot below.
In my project I also use the 10th version of Java. I don't quite get what the problem is here, so any hint would help.
P.S.: similar questions like this one did not solve my problem
Upvotes: 0
Views: 316
Reputation: 79085
The URL pattern must start with a /
.
Replace
<url-pattern>add</url-pattern>
with
<url-pattern>/add</url-pattern>
Upvotes: 1