I am using Eclipse and Tomcat 7, on servlet I just add @WebServlet("className") so that I do not have to use or to put web.xml but when I try to start server (or tomcat) on console window and error occured saying
Starting Servlet Engine: Apache Tomcat/7.0.12 java.lang.IllegalArgumentException: Invalid <url-pattern> FirstHello in servlet mapping at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3133) at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3108) ... At first I did not put web.xml on project, then when the error shows I try to put web.xml but does not have servlet mapping
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> </web-app> but still same error messge show on Console window of eclipse.
Anyone who could help me to see any error(s) that I am doing?
Thanks..