I'm doing a project with registration/login forms with tomcat7 for two types of users, and i created everything: login, registration1, registration2, and some validating class for each one. I have some problems in my web.xml, saying "invalid content was found starting with element 'servlet-name'.I have all the files in some directories, with the exception of the 2 registration in /src, and the validating ones in /login/(all servlets + logins). Here's my code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>Login</servlet-class>
<servlet-name>RegisterMedico</servlet-name>
<servlet-class>/progettoTesi/src/RegisterMedic</servlet-class>
<servlet-name>RegisterUser</servlet-name>
<servlet-class>progettoTesi/src/RegisterUser</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>progettoTesi/WebContent/login</url-pattern>
<servlet-name>RegisterMedic</servlet-name>
<url-pattern>progettoTesi/src/RegisterMedic</url-pattern>
<servlet-name>RegisterUser</servlet-name>
<url-pattern>progettoTesi/src/RegisterUser</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
I can't understand what my error is: the name of my servlets are correct. Is this a java problem? How can i solve this issue?