I\'m trying to deploy new web application in Tomcat 6.0, but whenever I click on start button, I repeatedly getting FAIL - Application at context path /Hello could not
I've had the same problem, was missing a slash in servlet url in web.xml
replace
<servlet-mapping>
<servlet-name>jsonservice</servlet-name>
<url-pattern>jsonservice</url-pattern>
</servlet-mapping>
with
<servlet-mapping>
<servlet-name>jsonservice</servlet-name>
<url-pattern>/jsonservice</url-pattern>
</servlet-mapping>
1st Reason could be the ending tag of your application's web.xml file which could not have been closed properly.
web.xml might be ending with <web-app>
, but must end with </web-app>
2nd Reason which worked in my case could be the lib folder of your tomcat must contain the supporting jar file of your database.
ojdbc
on case of Oracle or sqljdbc
in case of SqlServer
check web.xml file maybe servletContextlistener not doing well . in my case i added servletContextlistener and let him an empty and gave me the same error, i tried to delete it from project files but it still in web.xml file .finally i delete it from the web.xml and save the file . run the project and it stated successfully
You need to close the XML with </web-app>
, not with <web-app>
.
Your web.xml
ends with <web-app>
, but must end with </web-app>
Which by the way is almost literally what the exception tells you.
Is EmailHandler
really the full name of your servlet class, i.e. it's not in a package like com.something.EmailHandler
? It has to be fully-qualified in web.xml
.